supervisor

package
v0.15.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

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) Load added in v0.15.0

func (mss *MemStatesStorage) Load() ([]byte, error)

func (*MemStatesStorage) Save added in v0.15.0

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

type StatesStorage

type StatesStorage interface {
	// Save state to storage space.
	Save([]byte)
	// Load state from storage space.
	Load() ([]byte, error)
	// Clean the previously saved state.
	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