atomic_p2p.peer.monitor package¶
Submodules¶
atomic_p2p.peer.monitor.command module¶
-
class
atomic_p2p.peer.monitor.command.
HelpCmd
(monitor)¶ Bases:
atomic_p2p.communication.command.Command
show the help for monitor. Usage in prompt: monitor help [cmd]
-
class
atomic_p2p.peer.monitor.command.
ListCmd
(monitor)¶ Bases:
atomic_p2p.communication.command.Command
list all peer status in list Usage in prompt: monitor list
-
class
atomic_p2p.peer.monitor.command.
ManualCmd
(monitor)¶ Bases:
atomic_p2p.communication.command.Command
manually to send a check pkt to specific peer. Usage in prompt: monitor manuadl [ip:port]
-
class
atomic_p2p.peer.monitor.command.
PauseCmd
(monitor)¶ Bases:
atomic_p2p.communication.command.Command
pause monitor keep checking peers. Usage in prompt: monitor pause
-
class
atomic_p2p.peer.monitor.command.
PeriodCmd
(monitor)¶ Bases:
atomic_p2p.communication.command.Command
adjust monitor’s checking delay in seconds. Usage in prompt: monitor period [seconds]
-
class
atomic_p2p.peer.monitor.command.
ResetCmd
(monitor)¶ Bases:
atomic_p2p.communication.command.Command
reset specific or every peer’s status in monitor’s list. Usage in prompt: monitor reset all
-
class
atomic_p2p.peer.monitor.command.
VerboseCmd
(monitor)¶ Bases:
atomic_p2p.communication.command.Command
toggle verbose flag in monitor to output more detail or not. Usage in prompt: monitor verbose
atomic_p2p.peer.monitor.communication module¶
Module contents¶
-
class
atomic_p2p.peer.monitor.
Monitor
(peer, loop_delay=10, verbose=False, max_no_response_count=5, logger=<Logger atomic_p2p.peer.monitor (DEBUG)>)¶ Bases:
threading.Thread
,atomic_p2p.mixin.commandable.CommandableMixin
,atomic_p2p.mixin.handleable.HandleableMixin
-
is_start
()¶ - Return type
bool
-
on_recv_pkt
(addr, pkt, conn)¶ - Return type
None
-
peer_status_update_by_host
(host, status_type=<StatusType.PENDING: 'pending'>)¶
-
removeMonitorlist
(missing)¶ - Return type
None
-
run
()¶ 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
None
-
start
()¶ 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
None
-
stop
()¶ - Return type
None
-