daemon

package module
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: Apache-2.0 Imports: 8 Imported by: 4

README

Daemon

Build Status codecov Go Report Card

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrShutdownTimeout = errors.New("shutdown timeout")

ErrShutdownTimeout .

Functions

This section is empty.

Types

type ApplyConfigFunc

type ApplyConfigFunc func(conf, reset map[string]string)

ApplyConfigFunc .

type ConfigReader

type ConfigReader interface {
	Read() error
}

ConfigReader .

type Daemon

type Daemon interface {
	Run(shutdownTimeout time.Duration) error
	RegisterShutdownFunc(f ...ShutdownFunc)
	RegisterHealthCheckFunc(f HealthCheckFunc)
}

Daemon is a interface.

func New

func New(l logging.Logger, cr ConfigReader) (Daemon, error)

New create a new Daemon.

type HealthCheckFunc

type HealthCheckFunc func() bool

HealthCheckFunc .

type ShutdownFunc

type ShutdownFunc func()

ShutdownFunc .

type WatcherConfig

type WatcherConfig struct {
	Prefix    string
	MainKey   string
	Keys      []string
	ApplyFunc ApplyConfigFunc
}

WatcherConfig .

type WatcherConfigFunc

type WatcherConfigFunc func() WatcherConfig

WatcherConfigFunc .

Directories

Path Synopsis
configuring
env
cmd
health
env
redis
tests

Jump to

Keyboard shortcuts

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