daemon

package
v0.45.3 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunOrGo

func RunOrGo(f func() error) error

RunOrGo depending on whether we're in the daemon or not.

Types

type Daemon

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

Daemon encapsulates daemon.Context for providing a simple API for varroa.

func New

func New(pidFile, logFile string) *Daemon

New create a new daemon.

func (*Daemon) Find

func (d *Daemon) Find() (*os.Process, error)

Find the process, if it is running.

func (*Daemon) IsRunning

func (d *Daemon) IsRunning() bool

IsRunning return true if it is.

func (*Daemon) Start

func (d *Daemon) Start(args []string) error

Start the daemon and return true if in child process.

func (*Daemon) Stop

func (d *Daemon) Stop(daemonProcess *os.Process)

Stop Daemon if running.

func (*Daemon) WaitForStop

func (d *Daemon) WaitForStop()

WaitForStop and clean exit.

Jump to

Keyboard shortcuts

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