systemd

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSystemConf

func GetSystemConf(rw http.ResponseWriter) error

func InitSystemd

func InitSystemd()

func ListUnits

func ListUnits(ctx context.Context, w http.ResponseWriter) error

func ManagerAcquireSystemProperty

func ManagerAcquireSystemProperty(ctx context.Context, w http.ResponseWriter, property string) error

func RegisterRouterSystemd

func RegisterRouterSystemd(router *mux.Router)

func UpdateSystemConf

func UpdateSystemConf(rw http.ResponseWriter, r *http.Request) error

Types

type Describe

type Describe struct {
	Version        string `json:"Version"`
	Features       string `json:"Features"`
	Virtualization string `json:"Virtualization"`
	Architecture   string `json:"Architecture"`
	Tainted        string `json:"Tainted"`
	NNames         string `json:"NNames"`
	ControlGroup   string `json:"ControlGroup"`
	SystemState    string `json:"SystemState"`
}

func ManagerDescribe

func ManagerDescribe(ctx context.Context) (*Describe, error)

type Property

type Property struct {
	Property string `json:"property"`
	Value    string `json:"value"`
}

type UnitAction

type UnitAction struct {
	Action   string `json:"Action"`
	Unit     string `json:"Unit"`
	UnitType string `json:"UnitType"`
	Property string `json:"Property"`
	Value    string `json:"Value"`
}

func (*UnitAction) AcquireAllUnitProperty

func (u *UnitAction) AcquireAllUnitProperty(ctx context.Context, w http.ResponseWriter) error

func (*UnitAction) AcquireUnitProperty

func (u *UnitAction) AcquireUnitProperty(ctx context.Context, w http.ResponseWriter) error

func (*UnitAction) AcquireUnitStatus

func (u *UnitAction) AcquireUnitStatus(ctx context.Context, w http.ResponseWriter) error

func (*UnitAction) AcquireUnitTypeProperty

func (u *UnitAction) AcquireUnitTypeProperty(ctx context.Context, w http.ResponseWriter) error

func (*UnitAction) UnitCommands

func (u *UnitAction) UnitCommands(ctx context.Context) error

type UnitStatus

type UnitStatus struct {
	Status                 string `json:"Property"`
	Unit                   string `json:"Unit"`
	Name                   string `json:"Name"`
	Description            string `json:"Description"`
	MainPid                uint32 `json:"MainPid"`
	LoadState              string `json:"LoadState"`
	ActiveState            string `json:"ActiveState"`
	SubState               string `json:"SubState"`
	Followed               string `json:"Followed"`
	Path                   string `json:"Path"`
	JobId                  uint32 `json:"JobId"`
	JobType                string `json:"JobType"`
	JobPath                string `json:"JobPath"`
	UnitFileState          string `json:"UnitFileState"`
	StateChangeTimestamp   int64  `json:"StateChangeTimestamp"`
	InactiveExitTimestamp  int64  `json:"InactiveExitTimestamp"`
	ActiveEnterTimestamp   int64  `json:"ActiveEnterTimestamp"`
	ActiveExitTimestamp    int64  `json:"ActiveExitTimestamp"`
	InactiveEnterTimestamp int64  `json:"InactiveEnterTimestamp"`
}

Jump to

Keyboard shortcuts

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