process

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dir

func Dir() string

Dir is the directory for daemon files.

Types

type Dependency

type Dependency interface {
	Installed() bool
	Install(environment.HostActions) error
}

Dependency is a requirement to be fulfilled before a process can be started.

func Dependencies

func Dependencies(processes ...Process) (deps Dependency, root bool)

Dependencies returns the dependencies for the processes. root returns if root access is required

type Process

type Process interface {
	// Name for the background process
	Name() string
	// Start starts the background process.
	// The process is expected to terminate when ctx is done.
	Start(ctx context.Context) error
	// Alive checks if the process is the alive.
	Alive(ctx context.Context) error
	// Dependencies are requirements for start to succeed.
	// root should be true if root access is required for
	// installing any of the dependencies.
	Dependencies() (deps []Dependency, root bool)
}

Process is a background process managed by the daemon.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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