service_public

package
v0.0.40 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Disable added in v0.0.38

func Disable(definition_path string, now bool) error

func Enable added in v0.0.38

func Enable(definition_path string, now bool) error

func Inspect added in v0.0.16

func Inspect(service *Service, state *InspectState) (json.RawMessage, error)

func PrintInspect

func PrintInspect(services ...string) error

func PrintList

func PrintList(settings PrintListSettings) error

func PrintListCommands added in v0.0.15

func PrintListCommands(service *Service) error

func PrintListFilter added in v0.0.16

func PrintListFilter(service *Service, settings PrintListSettings) (bool, error)

func PrintService

func PrintService(name string) error

func Reload

func Reload(definition_path string, opts ReloadOpts) error

func ReloadServices added in v0.0.15

func ReloadServices(inclusive bool) error

func Restart

func Restart(definition_path string, opts RestartOpts) error

func RunServiceCommand added in v0.0.15

func RunServiceCommand(service *Service, direct bool, env []string, cmd_name string, args ...string) error

func ServiceSetConfig

func ServiceSetConfig(filename string, config map[string]string) error

func Start

func Start(definition_path string) error

func Stop

func Stop(definition_path string) error

Types

type InspectState added in v0.0.16

type InspectState struct {
	UnitStatus dbus.UnitStatus `json:"unit_status"`
}

type PrintListSettings

type PrintListSettings struct {
	Unit              bool
	FilterApplication string
	FilterConfig      map[string][]Selector
	FilterJSONPaths   []string
	JSON              bool
	JSONs             bool
	CSV               bool
	CSVSeparator      string
	JSONPath          string
	ResumeBefore      *Selector
	ResumeAfter       *Selector
	StopBefore        *Selector
	StopAfter         *Selector
}

type ReloadOpts added in v0.0.16

type ReloadOpts struct {
	NoBlock bool
}

type RestartOpts added in v0.0.23

type RestartOpts struct {
	NoBlock bool
}

type Selector added in v0.0.16

type Selector struct {
	Selector string
	Value    string
	Negate   bool
}

func (*Selector) Match added in v0.0.16

func (sel *Selector) Match(val string) (bool, error)

Jump to

Keyboard shortcuts

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