powermon.libs.daemon module¶
daemon.py
- class powermon.libs.daemon.Daemon(_type, keepalive, enabled)¶
Bases:
object
abstraction to support different daemon approaches / solutions
- classmethod from_config(config=None)¶
build the object from a config dict
- initialize()¶
Daemon initialization activities
- to_dto()¶
return the data transfer object version of this object
- class powermon.libs.daemon.DaemonDTO(*, daemon_type: DaemonType, enabled: bool, keepalive: int)¶
Bases:
BaseModel
data transfer ojbect model
- model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[Dict[str, FieldInfo]] = {'daemon_type': FieldInfo(annotation=DaemonType, required=True), 'enabled': FieldInfo(annotation=bool, required=True), 'keepalive': FieldInfo(annotation=int, required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.
This replaces Model.__fields__ from Pydantic V1.
- class powermon.libs.daemon.DaemonType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
StrEnum
Daemon types implemented
- class powermon.libs.daemon.dummyNotification(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
StrEnum