Documentation ¶
Index ¶
- Constants
- func GetBootstrapFile(dir, id string) (string, error)
- type Daemon
- func (d *Daemon) BootstrapFile() (string, error)
- func (d *Daemon) CheckStatus() (*model.DaemonInfo, error)
- func (d *Daemon) ConfigFile() string
- func (d *Daemon) FscacheWorkDir() string
- func (d *Daemon) GetAPISock() string
- func (d *Daemon) GetFsMetric(sharedDaemon bool, sid string) (*model.FsMetric, error)
- func (d *Daemon) IsMultipleDaemon() bool
- func (d *Daemon) IsPrefetchDaemon() bool
- func (d *Daemon) IsSharedDaemon() bool
- func (d *Daemon) LogFile() string
- func (d *Daemon) MountPoint() string
- func (d *Daemon) NydusdThreadNum() string
- func (d *Daemon) OldMountPoint() string
- func (d *Daemon) SharedAbsMountPoint() string
- func (d *Daemon) SharedMount() error
- func (d *Daemon) SharedMountPoint() string
- func (d *Daemon) SharedUmount() error
- func (d *Daemon) WaitUntilReady() error
- type NewDaemonOpt
- func WithAPISock(apiSock string) NewDaemonOpt
- func WithConfigDir(dir string) NewDaemonOpt
- func WithCustomMountPoint(customMountPoint string) NewDaemonOpt
- func WithFsDriver(fsDriver string) NewDaemonOpt
- func WithID(id string) NewDaemonOpt
- func WithImageID(imageID string) NewDaemonOpt
- func WithLogDir(dir string) NewDaemonOpt
- func WithLogLevel(logLevel string) NewDaemonOpt
- func WithLogToStdout(logToStdout bool) NewDaemonOpt
- func WithNydusdThreadNum(nydusdThreadNum int) NewDaemonOpt
- func WithPrefetchDaemon() NewDaemonOpt
- func WithRootMountPoint(rootMountPoint string) NewDaemonOpt
- func WithSharedDaemon() NewDaemonOpt
- func WithSnapshotDir(dir string) NewDaemonOpt
- func WithSnapshotID(id string) NewDaemonOpt
- func WithSocketDir(dir string) NewDaemonOpt
Constants ¶
const ( APISocketFileName = "api.sock" )
Variables ¶
This section is empty.
Functions ¶
func GetBootstrapFile ¶
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 FsDriver 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 (*Daemon) CheckStatus ¶
func (d *Daemon) CheckStatus() (*model.DaemonInfo, error)
func (*Daemon) ConfigFile ¶
func (*Daemon) FscacheWorkDir ¶ added in v0.3.0
func (*Daemon) GetAPISock ¶ added in v0.2.1
func (*Daemon) GetFsMetric ¶ added in v0.2.0
func (*Daemon) IsMultipleDaemon ¶
func (*Daemon) IsPrefetchDaemon ¶
func (*Daemon) IsSharedDaemon ¶
func (*Daemon) MountPoint ¶
Mountpoint of per-image nydusd/rafs. It is a kernel mountpoint for each nydus meta layer. Each meta layer is associated with a nydusd.
func (*Daemon) NydusdThreadNum ¶
NydusdThreadNum returns `nydusd-thread-num` for nydusd if set, otherwise will return the number of CPUs as default.
func (*Daemon) OldMountPoint ¶
Keep this for backwards compatibility
func (*Daemon) SharedAbsMountPoint ¶ added in v0.3.0
This is generally used for overlayfs lower dir path.
func (*Daemon) SharedMount ¶
func (*Daemon) SharedMountPoint ¶
Mountpoint for nydusd within single kernel mountpoint(FUSE mount). Each mountpoint is create by API based pseudo mount. `RootMountPoint` is real mountpoint where to perform the kernel mount. Nydusd API based mountpoint must start with "/", otherwise nydusd API server returns error.
func (*Daemon) SharedUmount ¶
func (*Daemon) WaitUntilReady ¶ added in v0.2.1
type NewDaemonOpt ¶
func WithAPISock ¶
func WithAPISock(apiSock string) NewDaemonOpt
func WithConfigDir ¶
func WithConfigDir(dir string) NewDaemonOpt
func WithCustomMountPoint ¶
func WithCustomMountPoint(customMountPoint string) NewDaemonOpt
func WithFsDriver ¶ added in v0.3.0
func WithFsDriver(fsDriver 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
In Shared mode, it is the mountpoint where single nydusd mounts
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