librex

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: BSD-2-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RootexecPath      = "/usr/local/bin/rootexec"
	RootexecFlagName  = "-n"
	RootexecFlagShell = "-s=true"
)

Rootexec data

View Source
const (
	StateOff    byte = 0x00
	StateOn     byte = 0xff
	StatePaused byte = 0x0f
)

States

View Source
const (
	SlabelOff    = "Offline"
	SlabelOn     = "Online"
	SlabelPaused = "Paused"
)

State labels

Variables

This section is empty.

Functions

func StateToLabel

func StateToLabel(state byte) string

Convert state to label

Types

type Rex

type Rex struct {
	Config libve.VirtConfig
	State  byte
	// contains filtered or unexported fields
}

Rootexec instance structure

func NewRex

func NewRex(name string, vc libve.VirtConfig) *Rex

Allocate rootexec instance structure

func Reproc added in v1.0.0

func Reproc(name string, rexPtr *Rex) *Rex

(Re)allocate rootexec process

func (*Rex) Pause

func (rexPtr *Rex) Pause() error

Pause rootexec instance

func (*Rex) Resume

func (rexPtr *Rex) Resume() error

Resume rootexec instance

func (*Rex) Start

func (rexPtr *Rex) Start() error

Start and execute rootexec instance

func (*Rex) Stop

func (rexPtr *Rex) Stop() error

Stop rootexec instance

type RexMap

type RexMap struct {
	Lock *sync.Mutex
	Map  map[string]*Rex
}

Rootexec instance store

func MakeRexMap

func MakeRexMap(size int) RexMap

Allocate a RexMap

Jump to

Keyboard shortcuts

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