command

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 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"`
	Supervisor string `type:"param" name:"supervisor"`
	LogFile    string `type:"param" name:"log-file"`
}

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 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 WithMode

func WithMode(m string) Opt

func WithMountpoint

func WithMountpoint(m 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