supervisor

package
v0.13.12 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

View Source
const MaxOpaqueLen = 1024 * 32 // Bytes

Variables

This section is empty.

Functions

This section is empty.

Types

type MemStatesStorage

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

Store daemon states in memory

func (*MemStatesStorage) Clean

func (mss *MemStatesStorage) Clean()

func (*MemStatesStorage) Read

func (mss *MemStatesStorage) Read(data []byte) (uint, error)

func (*MemStatesStorage) Write

func (mss *MemStatesStorage) Write(data []byte)

type StatesStorage

type StatesStorage interface {
	// Appended write states to the storage space.
	Write([]byte)
	// Read out the previously written states to fill `buf` which should be large enough.
	Read(buf []byte) (uint, error)
	// Mark all data as stale, the previously written data is cleaned
	Clean()
}

type Supervisor

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

Use daemon ID as the supervisor ID

func (*Supervisor) FetchDaemonStates

func (su *Supervisor) FetchDaemonStates(trigger func() error) error

func (*Supervisor) SendStatesTimeout

func (su *Supervisor) SendStatesTimeout(to time.Duration) error

func (*Supervisor) Sock

func (su *Supervisor) Sock() string

The unix domain socket on which nydus daemon is connected to

type SupervisorsSet

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

Manage all supervisors each of which works for a nydusd to keep its resources for sake of failover and live-upgrade.

func NewSupervisorSet

func NewSupervisorSet(root string) (*SupervisorsSet, error)

func (*SupervisorsSet) DestroySupervisor

func (ss *SupervisorsSet) DestroySupervisor(id string) error

func (*SupervisorsSet) GetSupervisor

func (ss *SupervisorsSet) GetSupervisor(id string) *Supervisor

Get supervisor by its id which is typically the nydus damon ID.

func (*SupervisorsSet) NewSupervisor

func (ss *SupervisorsSet) NewSupervisor(id string) *Supervisor

Jump to

Keyboard shortcuts

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