p2pfl.communication.protocols.protobuff.gossiper moduleยถ

Protocol agnostic gossiper.

class p2pfl.communication.protocols.protobuff.gossiper.Gossiper(neighbors, period=None, messages_per_period=None)[source]ยถ

Bases: Thread, NodeComponent

Gossiper for agnostic communication protocol.

add_message(*args: Any, **kwargs: Any) Anyยถ
Return type:

Any

check_and_set_processed(*args: Any, **kwargs: Any) Anyยถ
Return type:

Any

gossip_weights(*args: Any, **kwargs: Any) Anyยถ
Return type:

Any

run(*args: Any, **kwargs: Any) Anyยถ

Method representing the threadโ€™s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the objectโ€™s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

Return type:

Any

set_addr(addr)[source]ยถ

Set the address.

Return type:

str

start(*args: Any, **kwargs: Any) Anyยถ

Start the threadโ€™s activity.

It must be called at most once per thread object. It arranges for the objectโ€™s run() method to be invoked in a separate thread of control.

This method will raise a RuntimeError if called more than once on the same thread object.

Return type:

Any

stop(*args: Any, **kwargs: Any) Anyยถ
Return type:

Any