kitty.core.actor module¶
This module contains KittyActorInterface
which is the base class for both monitors and controllers.
-
class
kitty.core.actor.
KittyActorInterface
(name, logger=None, victim_alive_check_delay=0.3)[source]¶ Bases:
kitty.core.kitty_object.KittyObject
Base class for monitors and controllers, its defines (and partially implements) the Kitty Actor API:
-
__init__
(name, logger=None, victim_alive_check_delay=0.3)[source]¶ Parameters: - name – name of the actor
- logger – logger for the actor (default: None)
- victim_alive_check_delay – delay between checks if alive (default: 0.3)
-
get_report
()[source]¶ Return type: Report
Returns: a report about the victim since last call to pre_test
-
is_victim_alive
()[source]¶ Called during pre_test in loop until the target becomes alive
Returns: whether target is alive (ready for test) or not Note
by default, it returns true, override if you have a way to check in your actor
-
pre_test
(test_number)[source]¶ Called before a test is started. Call super if overriden.
Parameters: test_number – current test number
-