daemon

package
v0.3.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: Apache-2.0 Imports: 16 Imported by: 4

Documentation

Index

Constants

View Source
const (
	APISocketFileName   = "api.sock"
	SharedNydusDaemonID = "shared_daemon"
)

Variables

This section is empty.

Functions

func GetBootstrapFile

func GetBootstrapFile(dir, id string) (string, error)

Types

type Daemon

type Daemon struct {
	ID               string
	SnapshotID       string
	ConfigDir        string
	SocketDir        string
	LogDir           string
	LogLevel         string
	LogToStdout      bool
	SnapshotDir      string
	Pid              int
	ImageID          string
	DaemonMode       string
	DaemonBackend    string
	APISock          *string
	RootMountPoint   *string
	CustomMountPoint *string

	// Client will be rebuilt on Reconnect, skip marshal/unmarshal
	Client nydussdk.Interface `json:"-"`
	Once   *sync.Once         `json:"-"`
	// contains filtered or unexported fields
}

func NewDaemon

func NewDaemon(opt ...NewDaemonOpt) (*Daemon, error)

func (*Daemon) BootstrapFile

func (d *Daemon) BootstrapFile() (string, error)

func (*Daemon) CheckStatus

func (d *Daemon) CheckStatus() (*model.DaemonInfo, error)

func (*Daemon) ConfigFile

func (d *Daemon) ConfigFile() string

func (*Daemon) FscacheWorkDir added in v0.3.0

func (d *Daemon) FscacheWorkDir() string

func (*Daemon) GetAPISock added in v0.2.1

func (d *Daemon) GetAPISock() string

func (*Daemon) GetFsMetric added in v0.2.0

func (d *Daemon) GetFsMetric(sharedDaemon bool, sid string) (*model.FsMetric, error)

func (*Daemon) IsMultipleDaemon

func (d *Daemon) IsMultipleDaemon() bool

func (*Daemon) IsPrefetchDaemon

func (d *Daemon) IsPrefetchDaemon() bool

func (*Daemon) IsSharedDaemon

func (d *Daemon) IsSharedDaemon() bool

func (*Daemon) LogFile

func (d *Daemon) LogFile() string

func (*Daemon) MountPoint

func (d *Daemon) MountPoint() string

func (*Daemon) NydusdThreadNum

func (d *Daemon) NydusdThreadNum() string

NydusdThreadNum returns `nydusd-thread-num` for nydusd if set, otherwise will return the number of CPUs as default.

func (*Daemon) OldMountPoint

func (d *Daemon) OldMountPoint() string

func (*Daemon) SharedMount

func (d *Daemon) SharedMount() error

func (*Daemon) SharedMountPoint

func (d *Daemon) SharedMountPoint() string

func (*Daemon) SharedUmount

func (d *Daemon) SharedUmount() error

func (*Daemon) WaitUntilReady added in v0.2.1

func (d *Daemon) WaitUntilReady() error

type NewDaemonOpt

type NewDaemonOpt func(d *Daemon) error

func WithAPISock

func WithAPISock(apiSock string) NewDaemonOpt

func WithConfigDir

func WithConfigDir(dir string) NewDaemonOpt

func WithCustomMountPoint

func WithCustomMountPoint(customMountPoint string) NewDaemonOpt

func WithDaemonBackend

func WithDaemonBackend(daemonBackend string) NewDaemonOpt

func WithID

func WithID(id string) NewDaemonOpt

func WithImageID

func WithImageID(imageID string) NewDaemonOpt

func WithLogDir

func WithLogDir(dir string) NewDaemonOpt

func WithLogLevel

func WithLogLevel(logLevel string) NewDaemonOpt

func WithLogToStdout

func WithLogToStdout(logToStdout bool) NewDaemonOpt

func WithNydusdThreadNum

func WithNydusdThreadNum(nydusdThreadNum int) NewDaemonOpt

func WithPrefetchDaemon

func WithPrefetchDaemon() NewDaemonOpt

func WithRootMountPoint

func WithRootMountPoint(rootMountPoint string) NewDaemonOpt

func WithSharedDaemon

func WithSharedDaemon() NewDaemonOpt

func WithSnapshotDir

func WithSnapshotDir(dir string) NewDaemonOpt

func WithSnapshotID

func WithSnapshotID(id string) NewDaemonOpt

func WithSocketDir

func WithSocketDir(dir string) NewDaemonOpt

Jump to

Keyboard shortcuts

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