service

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Signal sent by the "ACPI tiny power button" kernel driver.
	// It is assumed the kernel will be compiled to use it.
	SIGPWRBTN = syscall.Signal(0x26)

	// Flag indicating process is a kernel thread, from include/linux/sched.h.
	PF_KTHREAD = 0x00200000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChronyService

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

func (*ChronyService) Optional

func (s *ChronyService) Optional() bool

func (*ChronyService) PID

func (s *ChronyService) PID() int

func (*ChronyService) Start

func (s *ChronyService) Start() error

func (*ChronyService) Stop

func (s *ChronyService) Stop()

func (*ChronyService) WaitInit

func (s *ChronyService) WaitInit()

func (*ChronyService) WaitStart

func (s *ChronyService) WaitStart()

func (*ChronyService) WaitStop

func (s *ChronyService) WaitStop() error

type InitFunc

type InitFunc func() error

type Main

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

func (*Main) Optional

func (s *Main) Optional() bool

func (*Main) PID

func (s *Main) PID() int

func (*Main) Start

func (m *Main) Start() error

func (*Main) Stop

func (s *Main) Stop()

func (*Main) WaitInit

func (s *Main) WaitInit()

func (*Main) WaitStart

func (s *Main) WaitStart()

func (*Main) WaitStop

func (s *Main) WaitStop() error

type SSHDService

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

func (*SSHDService) Optional

func (s *SSHDService) Optional() bool

func (*SSHDService) PID

func (s *SSHDService) PID() int

func (*SSHDService) Start

func (s *SSHDService) Start() error

func (*SSHDService) Stop

func (s *SSHDService) Stop()

func (*SSHDService) WaitInit

func (s *SSHDService) WaitInit()

func (*SSHDService) WaitStart

func (s *SSHDService) WaitStart()

func (*SSHDService) WaitStop

func (s *SSHDService) WaitStop() error

type Service

type Service interface {
	Start() error
	WaitInit()
	WaitStart()
	WaitStop() error
	Stop()
	Optional() bool
	PID() int
}

func NewChronyService

func NewChronyService() Service

func NewMainService

func NewMainService(command, env []string, workingDir string, uid, gid uint32) Service

func NewSSHDService

func NewSSHDService() Service

type Supervisor

type Supervisor struct {
	Main           Service
	ReadonlyRootFS bool
	Services       []Service
	Timeout        time.Duration
}

func (*Supervisor) Kill

func (s *Supervisor) Kill()

func (*Supervisor) Start

func (s *Supervisor) Start() error

func (*Supervisor) Stop

func (s *Supervisor) Stop()

func (*Supervisor) Wait

func (s *Supervisor) Wait()

Jump to

Keyboard shortcuts

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