ser

package
v0.0.0-...-5998bd7 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultManager = "systemd"

DefaultManager if not empty is the default service-manager to use when missing

View Source
var ErrNotInstalled = errors.New("no candidate installed")

ErrNotInstalled is raised when the candidate service manager is not installed on the host system (use command-line -dry-run to avoid execution errors and just check your buildfile syntax)

View Source
var ErrUnknownAction = errors.New("unknown action")

ErrUnknownAction is raised when an unknown action is called (enable, start, ...)

View Source
var ErrUnknownManager = errors.New("unknown service manager")

ErrUnknownManager is raised when the asked manager does not exist

Functions

This section is empty.

Types

type ServiceManager

type ServiceManager interface {
	// SetExecContext sets the execution context, default is os/exec
	SetExecutor(exec.Executor)
	// Name of executable (to check if installed and for debug)
	Name() string
	// Exec a specific action on a service
	Exec(action, service string) error
}

ServiceManager is the common interface for service managers (systemd, init.d)

func Load

func Load(_manager string, _exec exec.Executor) (ServiceManager, error)

Load a specific service-manager by its name

Jump to

Keyboard shortcuts

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