lsst.dax.apdb g864b0138d7+33ab2bc355
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | List of all members
lsst.dax.apdb.monitor.MonFilter Class Reference

Public Member Functions

 __init__ (self, str rule)
 
bool is_match_all (self)
 
bool|None accept (self, str agent_name)
 

Public Attributes

 agent_name
 

Protected Attributes

 _accept
 

Detailed Description

Filter for the names associated with client agents.

Parameters
----------
rule : `str`
    String specifying filtering rule for a single name, or catch-all rule.
    The rule consist of the agent name prefixed by minus or optional plus
    sign. Catch-all rule uses name "any". If the rule starts with minus
    sign then matching agent will be rejected. Otherwise matching agent
    is accepted.

Member Function Documentation

◆ accept()

bool | None lsst.dax.apdb.monitor.MonFilter.accept ( self,
str agent_name )
Return filtering decision for specified agent name.

Parameters
----------
agent_name : `str`
    Name of the clent agent that produces monitoring record.

Returns
-------
decision : `bool` or `None`
    `True` if the agent is accepted, `False` if agent is rejected.
    `None` is returned if this rule does not match agent name and
    decision should be made by the next rule.

◆ is_match_all()

bool lsst.dax.apdb.monitor.MonFilter.is_match_all ( self)
Return `True` if this rule is a catch-all rule.

Returns
-------
is_match_all : `bool`
    `True` if rule name is `-any`, `+any`, or `any`.

The documentation for this class was generated from the following file: