watchdog

package
v0.0.0-...-1cdf2d7 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service contains the data needed to manage a service.

func (*Service) AddArgs

func (svc *Service) AddArgs(args string)

AddArgs adds the given string as arguments.

func (*Service) AddDependency

func (svc *Service) AddDependency(name string)

AddDependency registers a dependency for this service.

func (*Service) SetPriority

func (svc *Service) SetPriority(priority int) error

SetPriority sets the process priority for a service.

func (*Service) SetTermTimeout

func (svc *Service) SetTermTimeout(tt time.Duration)

SetTermTimeout sets the termination timeout for a service.

func (*Service) SetUser

func (svc *Service) SetUser(username string) error

SetUser sets the user for a service.

type Watchdog

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

Watchdog contains the data needed to run a watchdog.

func NewWatchdog

func NewWatchdog() *Watchdog

NewWatchdog returns an initialised watchdog.

func (*Watchdog) AddService

func (w *Watchdog) AddService(name, binary string) (*Service, error)

AddService adds a service that is to be run by the watchdog.

func (*Watchdog) Shutdown

func (w *Watchdog) Shutdown()

Shutdown requests the watchdog to shutdown.

func (*Watchdog) Walk

func (w *Watchdog) Walk()

Walk takes the watchdog component for a walk so that it can run the configured services.

Jump to

Keyboard shortcuts

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