systemctl

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllMatch

func AllMatch(u1 []*UnitOption, u2 []*UnitOption) bool

func Serialize

func Serialize(opts []UnitOption) io.Reader

Types

type SystemCTL

type SystemCTL struct {
	Name       string
	IsUserUnit bool
}

func NewSystemCTL

func NewSystemCTL(name, unitContent string, IsUserUnit bool) (*SystemCTL, error)

func (*SystemCTL) IsRunningWithSinceTime

func (s *SystemCTL) IsRunningWithSinceTime() (bool, time.Duration)

func (*SystemCTL) Restart

func (s *SystemCTL) Restart() error

func (*SystemCTL) Start

func (s *SystemCTL) Start() error

func (*SystemCTL) Status

func (s *SystemCTL) Status() (status string, uptime time.Duration, err error)

func (*SystemCTL) Stop

func (s *SystemCTL) Stop() error

type UnitOption

type UnitOption struct {
	Section string
	Name    string
	Value   string
}

func NewUnitOption

func NewUnitOption(section, name, value string) *UnitOption

func (*UnitOption) Match

func (uo *UnitOption) Match(other *UnitOption) bool

func (*UnitOption) String

func (uo *UnitOption) String() string

Jump to

Keyboard shortcuts

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