daemonHelper

package module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

README

Daemon Helper

This library provides a way for daemons to work with OS signals.

This library has managed procedures for BuildUp (On startup or on reload completing), and TearDown (On shutdown and reload start).

Maintainer: Captain ALM

License: BSD 3-Clause

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Daemon

type Daemon interface {
	BuildUp(startup bool, logger *log.Logger)
	TearDown(stopping bool, logger *log.Logger)
}

Daemon provides an interface to start and stop a daemon

type DaemonRunner

type DaemonRunner interface {
	Begin()
	SignalReload()
	SignalShutdown()
	Starting() bool
	Reloading() bool
	Stopping() bool
	Active() bool
}

DaemonRunner provides an interface to run a daemon and signal actions

func NewDaemonRunner

func NewDaemonRunner(daemonIn Daemon, logger *log.Logger) DaemonRunner

NewDaemonRunner creates a new DaemonRunner implementation with the specified Daemon and logger.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL