# patroni.watchdog package

## Submodules

- patroni.watchdog.base module
  - `Watchdog`
    - `Watchdog.__init__()`
    - `Watchdog._activate()`
    - `Watchdog._disable()`
    - `Watchdog._set_timeout()`
    - `Watchdog.activate()`
    - `Watchdog.disable()`
    - `Watchdog.is_healthy`
    - `Watchdog.is_running`
    - `Watchdog.keepalive()`
    - `Watchdog.reload_config()`
  - `WatchdogError`
- patroni.watchdog.linux module
  - `IOC()`
  - `IOR()`
  - `IOW()`
  - `IOWR()`
  - `LinuxWatchdogDevice`
    - `LinuxWatchdogDevice.DEFAULT_DEVICE`
    - `LinuxWatchdogDevice.__init__()`
    - `LinuxWatchdogDevice._abc_impl`
    - `LinuxWatchdogDevice._ioctl()`
    - `LinuxWatchdogDevice.can_be_disabled`
    - `LinuxWatchdogDevice.close()`
    - `LinuxWatchdogDevice.describe()`
    - `LinuxWatchdogDevice.from_config()`
    - `LinuxWatchdogDevice.get_support()`
    - `LinuxWatchdogDevice.get_timeout()`
    - `LinuxWatchdogDevice.has_set_timeout()`
    - `LinuxWatchdogDevice.is_healthy`
    - `LinuxWatchdogDevice.is_running`
    - `LinuxWatchdogDevice.keepalive()`
    - `LinuxWatchdogDevice.open()`
    - `LinuxWatchdogDevice.set_timeout()`
  - `TestingWatchdogDevice`
    - `TestingWatchdogDevice._abc_impl`
    - `TestingWatchdogDevice.get_support()`
    - `TestingWatchdogDevice.get_timeout()`
    - `TestingWatchdogDevice.set_timeout()`
    - `TestingWatchdogDevice.timeout`
  - `WatchdogInfo`
    - `WatchdogInfo._asdict()`
    - `WatchdogInfo._field_defaults`
    - `WatchdogInfo._fields`
    - `WatchdogInfo._make()`
    - `WatchdogInfo._replace()`
    - `WatchdogInfo.identity`
    - `WatchdogInfo.options`
    - `WatchdogInfo.version`
  - `watchdog_info`
    - `watchdog_info._fields_`
    - `watchdog_info.firmware_version`
    - `watchdog_info.identity`
    - `watchdog_info.options`

## Module contents

class patroni.watchdog.Watchdog(config: Config)

  Bases: `object`

  Facade to dynamically manage watchdog implementations and handle config changes.

  When activation fails underlying implementation will be switched to a Null implementation. To avoid log spam activation will only be retried when watchdog configuration is changed.

  __init__(config: Config) → None
  _activate() → bool
  _disable() → None
  _set_timeout() → int | None
  activate(*args: Any, **kwargs: Any) → Any
  disable(*args: Any, **kwargs: Any) → Any
  property is_healthy: Any
  property is_running: Any
  keepalive(*args: Any, **kwargs: Any) → Any
  reload_config(*args: Any, **kwargs: Any) → Any

exception patroni.watchdog.WatchdogError(value: Any)

  Bases: `PatroniException`

  Any problem faced while managing a watchdog device.