daemon

package module
v0.0.0-...-40985ac Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2022 License: MIT Imports: 5 Imported by: 1

README

daemon

AFAIRE

Go Report Card Go Reference

Licence

MIT.


Copyright (c) 2021-2022 losyme

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ready

func Ready() (bool, error)

func Stopping

func Stopping() (bool, error)

func Watchdog

func Watchdog() (bool, error)

func WatchdogInterval

func WatchdogInterval() (time.Duration, error)

Types

type CheckFunc

type CheckFunc func() bool

type Daemon

type Daemon struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...Option) *Daemon

func (*Daemon) Start

func (d *Daemon) Start() (bool, error)

func (*Daemon) Stop

func (d *Daemon) Stop()

type Logger

type Logger interface {
	zombie.Logger
	Error(msg string, kv ...interface{})
}

type Option

type Option func(d *Daemon)

func WithCheckFunc

func WithCheckFunc(fn CheckFunc) Option

func WithLogger

func WithLogger(logger Logger) Option

Jump to

Keyboard shortcuts

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