Module killswitch

Source
Expand description

Killswitch.

This module implements code for shutting down cuprated after a certain timestamp has passed.

The reasoning is twofold:

  1. Limiting the effects of any network errors caused by a faulty cuprated.
  2. To enforce users to update alpha builds, if they choose to run them.

This behavior is limited to an alpha build; this module will be removed after a stable v1 release.

Constants§

KILLSWITCH_ACTIVATION_TIMESTAMP
The killswitch activates if the current timestamp is ahead of this timestamp.

Functions§

init_killswitch
Spawn a thread that sleeps until the KILLSWITCH_ACTIVATION_TIMESTAMP activates.
killswitch 🔒
Check if the system clock is past a certain timestamp, if so, exit the entire program.