class documentation

class ConfdFilterCallback(object):

View In Hierarchy

Callback that calls another callback, but filters duplicate results.

Method __call__ Filtering callback
Method __init__ Constructor for ConfdFilterCallback
Instance Variable consistent a dictionary indexed by salt; for each salt, if all responses ware identical, this will be True; this is the expected state on a healthy cluster; on inconsistent or partitioned clusters, this might be False, if we see answers with the same serial but different contents...
Method _HandleExpire Undocumented
Method _HandleReply Handle a single confd reply, and decide whether to filter it.
Method _LogFilter Undocumented
Instance Variable _answers Undocumented
Instance Variable _callback Undocumented
Instance Variable _logger Undocumented
def __call__(self, up):

Filtering callback

Parameters
up:ConfdUpcallPayloadupper callback
def __init__(self, callback, logger=None):

Constructor for ConfdFilterCallback

Parameters
callback:f(ConfdUpcallPayload)function to call when getting answers
logger:logging.Loggeroptional logger for internal conditions
consistent: dict =

a dictionary indexed by salt; for each salt, if all responses ware identical, this will be True; this is the expected state on a healthy cluster; on inconsistent or partitioned clusters, this might be False, if we see answers with the same serial but different contents

def _HandleExpire(self, up):

Undocumented

def _HandleReply(self, up):

Handle a single confd reply, and decide whether to filter it.

Returns
booleanTrue if the reply should be filtered, False if it should be passed on to the up-callback
def _LogFilter(self, salt, new_reply, old_reply):

Undocumented

_answers: dict =

Undocumented

_callback =

Undocumented

_logger =

Undocumented