package supervisor

import "github.com/containerd/nydus-snapshotter/pkg/supervisor"

Index

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

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

func (*MemStatesStorage) Save

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

Source Files

supervisor.go

Version
v0.15.2 (latest)
Published
May 26, 2025
Platform
linux/amd64
Imports
15 packages
Last checked
1 month ago

Tools for package owners.