unit

package
v0.0.0-...-bf94cda Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List() map[string]UnitInfo

func Load

func Load(name string) error

func LoadAll

func LoadAll() error

func SetStatus

func SetStatus(name string, status status) error

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func LoadService

func LoadService(name string, path string) (*Service, error)

func (*Service) Name

func (s *Service) Name() string

func (*Service) SetStatus

func (s *Service) SetStatus(status status) error

func (*Service) Start

func (s *Service) Start() error

func (*Service) Status

func (s *Service) Status() string

func (*Service) Stop

func (s *Service) Stop() error

type Unit

type Unit interface {
	Name() string
	Status() string
	SetStatus(status) error
	Start() error
	Stop() error
}

func Find

func Find(name string) (Unit, error)

type UnitInfo

type UnitInfo struct {
	Name string
}

Jump to

Keyboard shortcuts

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