command

package
v0.13.9 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCommand

func BuildCommand(opts []Opt) ([]string, error)

Build exec style command line

Types

type DaemonCommand

type DaemonCommand struct {
	// "singleton" "fuse"
	Mode string `type:"subcommand"`
	// "blobcache" "fscache" "virtiofs"
	FscacheDriver  string `type:"param" name:"fscache"`
	FscacheThreads string `type:"param" name:"fscache-threads"`
	Upgrade        bool   `type:"flag" name:"upgrade" default:""`
	ThreadNum      string `type:"param" name:"thread-num"`
	// `--id` is required by `--supervisor` when starting nydusd
	ID              string `type:"param" name:"id"`
	Config          string `type:"param" name:"config"`
	Bootstrap       string `type:"param" name:"bootstrap"`
	Mountpoint      string `type:"param" name:"mountpoint"`
	APISock         string `type:"param" name:"apisock"`
	LogLevel        string `type:"param" name:"log-level"`
	LogRotationSize int    `type:"param" name:"log-rotation-size"`
	Supervisor      string `type:"param" name:"supervisor"`
	LogFile         string `type:"param" name:"log-file"`
	PrefetchFiles   string `type:"param" name:"prefetch-files"`
	BackendSource   string `type:"param" name:"backend-source"`
}

Define how to build a command line to start a nydusd daemon

type Opt

type Opt = func(cmd *DaemonCommand)

func WithAPISock

func WithAPISock(api string) Opt

func WithBackendSource added in v0.13.5

func WithBackendSource(source string) Opt

func WithBootstrap

func WithBootstrap(b string) Opt

func WithConfig

func WithConfig(config string) Opt

func WithFscacheDriver

func WithFscacheDriver(w string) Opt

func WithFscacheThreads

func WithFscacheThreads(num int) Opt

func WithID

func WithID(id string) Opt

func WithLogFile

func WithLogFile(l string) Opt

func WithLogLevel

func WithLogLevel(l string) Opt

func WithLogRotationSize added in v0.10.0

func WithLogRotationSize(l int) Opt

func WithMode

func WithMode(m string) Opt

func WithMountpoint

func WithMountpoint(m string) Opt

func WithPrefetchFiles added in v0.12.0

func WithPrefetchFiles(p string) Opt

func WithSupervisor

func WithSupervisor(s string) Opt

func WithThreadNum

func WithThreadNum(num int) Opt

func WithUpgrade

func WithUpgrade() Opt

Jump to

Keyboard shortcuts

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