process

package
v0.0.0-...-3cab0da Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	DaemonMode string
	// contains filtered or unexported fields
}

func NewManager

func NewManager(opt Opt) (*Manager, error)

func (*Manager) CleanUpDaemonResource

func (m *Manager) CleanUpDaemonResource(d *daemon.Daemon)

func (*Manager) DeleteBySnapshotID

func (m *Manager) DeleteBySnapshotID(id string) (*daemon.Daemon, error)

func (*Manager) DeleteDaemon

func (m *Manager) DeleteDaemon(daemon *daemon.Daemon)

func (*Manager) DestroyBySnapshotID

func (m *Manager) DestroyBySnapshotID(id string) error

func (*Manager) DestroyDaemon

func (m *Manager) DestroyDaemon(d *daemon.Daemon) error

func (*Manager) GetByID

func (m *Manager) GetByID(id string) (*daemon.Daemon, error)

func (*Manager) GetBySnapshotID

func (m *Manager) GetBySnapshotID(id string) (*daemon.Daemon, error)

func (*Manager) IsPrefetchDaemon

func (m *Manager) IsPrefetchDaemon() bool

func (*Manager) IsSharedDaemon

func (m *Manager) IsSharedDaemon() bool

func (*Manager) ListDaemons

func (m *Manager) ListDaemons() []*daemon.Daemon

func (*Manager) NewDaemon

func (m *Manager) NewDaemon(daemon *daemon.Daemon) error

func (*Manager) Reconnect

func (m *Manager) Reconnect(ctx context.Context) error

Reconnect already running daemons,and rebuild daemons management structs.

func (*Manager) StartDaemon

func (m *Manager) StartDaemon(d *daemon.Daemon) error

type Opt

type Opt struct {
	NydusdBinaryPath string
	Database         *store.Database
	DaemonMode       string
}

type Store

type Store interface {
	Get(id string) (*daemon.Daemon, error)
	GetBySnapshot(snapshotID string) (*daemon.Daemon, error)
	Add(*daemon.Daemon) error
	Update(d *daemon.Daemon) error
	Delete(*daemon.Daemon) error
	List() []*daemon.Daemon
	Size() int
	WalkDaemons(ctx context.Context, cb func(*daemon.Daemon) error) error
	CleanupDaemons(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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