vdisc_cli

package
v0.0.0-...-5fe3b72 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = ""

Version is injected with git sha in build

Functions

func GcThresholdDecoder

func GcThresholdDecoder(ctx *kong.DecodeContext, target reflect.Value) error

func GcThresholdTypeMapper

func GcThresholdTypeMapper() kong.Option

func SIDecoder

func SIDecoder(ctx *kong.DecodeContext, target reflect.Value) error

func SITypeMapper

func SITypeMapper() kong.Option

func UUIDDecoder

func UUIDDecoder(ctx *kong.DecodeContext, target reflect.Value) error

func UUIDTypeMapper

func UUIDTypeMapper() kong.Option

Types

type BurnCmd

type BurnCmd struct {
	Url string     `short:"o" help:"VDisc output URL" required:"true"`
	Csv string     `short:"i" help:"Path to a CSV" required:"true"`
	Iso IsoOptions `embed prefix:"iso9660-"`
}

func (*BurnCmd) Run

func (cmd *BurnCmd) Run(globals *Globals) error

type CLI

type CLI struct {
	Globals

	Burn    BurnCmd    `cmd help:"Burn creates a new vdisc"`
	Cache   CacheCmd   `cmd help:"Cache management"`
	Cp      CpCmd      `cmd help:"Copy a file from a vdisc to a local path"`
	Inspect InspectCmd `cmd help:"Inspect a vdisc"`
	Ls      LsCmd      `cmd help:"List directory contents"`
	Mount   MountCmd   `cmd help:"Mount a vdisc"`
	Tree    TreeCmd    `cmd help:"Print the file system hierarchy as a tree"`
	Version VersionCmd `cmd help:"Print the client version information"`
}

type CacheCmd

type CacheCmd struct {
	Fsck FsckCmd `cmd help:"Cache integrity check"`
	Gc   GcCmd   `cmd help:"Cache garbage collection daemon"`
}

type CacheConfig

type CacheConfig struct {
	Mode            string   `help:"Cache mode" enum:"disabled,memory,disk" default:"disk"`
	Bsize           units.SI `help:"Cache buffer size" default:"4MiB"`
	Bcount          int64    `help:"Cache buffer count (memory mode only)" default:"16"`
	Root            string   `help:"Disk mode cache root directory" default:"/var/cache/vdisc"`
	ReadAheadWindow int      `help:"Read-ahead window per file (in blocks)" default:"32"`
	ReadAheadTokens int64    `help:"Read-ahead tokens shared across all files (in blocks)" default:"32"`
}

type CpCmd

type CpCmd struct {
	Url  string `short:"u" help:"The URL of the vdisc" required:"true"`
	Path string `short:"p" help:"The path in the vdisc to list" required:"true"`
	Out  string `short:"o" help:"Output file" required:"true"`
}

func (*CpCmd) Run

func (cmd *CpCmd) Run(globals *Globals) error

type FsckCmd

type FsckCmd struct{}

func (*FsckCmd) Run

func (cmd *FsckCmd) Run(globals *Globals) error

type GcCmd

type GcCmd struct {
	Period    time.Duration `help:"Period to wait between collections" default:"30s"`
	Threshold GcThreshold   `help:"Goal for disk free space. Either a percentage (e.g. 10%) or an absolute number of bytes" default:"100MiB"`
}

func (*GcCmd) Run

func (cmd *GcCmd) Run(globals *Globals) error

type GcThreshold

type GcThreshold struct {
	// contains filtered or unexported fields
}

func (*GcThreshold) GcNeeded

func (gt *GcThreshold) GcNeeded(st *syscall.Statfs_t) bool

type Globals

type Globals struct {
	LogLevel string      `help:"Set the logging level (debug|info|warn|error)" default:"info"`
	Cache    CacheConfig `embed prefix:"cache-"`
}

type InspectCmd

type InspectCmd struct {
	Url string `short:"u" help:"The URL of the vdisc" required:"true"`
}

func (*InspectCmd) Run

func (cmd *InspectCmd) Run(globals *Globals) error

type IsoOptions

type IsoOptions struct {
	NameValidation              string `help:"Restrictions on file names" enum:"portable,extended" default:"portable"`
	SystemIdentifier            string `help:"The name of the system that can act upon sectors 0x00-0x0F for the volume" default:"LINUX"`
	VolumeIdentifier            string `help:"Identification of this volume"`
	VolumeSetIdentifier         string `help:"Identifier of the volume set of which this volume is a member"`
	PublisherIdentifier         string `help:"The volume publisher"`
	DataPreparerIdentifier      string `help:"The identifier of the person(s) who prepared the data for this volume"`
	ApplicationIdentifier       string `help:"Identifies how the data are recorded on this volume" default:"NVIDIA VDISC"`
	CopyrightFileIdentifier     string `help:"Filename of a file in the root directory that contains copyright information for this volume set"`
	AbstractFileIdentifier      string `help:"Filename of a file in the root directory that contains abstract information for this volume set"`
	BibliographicFileIdentifier string `help:"Filename of a file in the root directory that contains bibliographic information for this volume set"`
}

type LsCmd

type LsCmd struct {
	Url       string `short:"u" help:"The URL of the vdisc" required:"true"`
	Path      string `short:"p" help:"The path in the vdisc to list" required:"true"`
	Long      bool   `short:"l" help:"Long listing"`
	Recursive bool   `short:"r" help:"Recursive listing"`
}

func (*LsCmd) Run

func (cmd *LsCmd) Run(globals *Globals) error

type MountCmd

type MountCmd struct {
	Url            string              `short:"u" help:"The URL of the vdisc" required:"true"`
	Mountpoint     string              `short:"p" help:"The path to mount the vdisc" required:"true" type:"existingdir"`
	Mode           string              `short:"m" help:"The mount mode" enum:"fuse,tcmu" default:"fuse"`
	Fuse           isofuse.Options     `embed prefix:"fuse-"`
	Tcmu           blockdev.TCMUConfig `embed prefix:"tcmu-"`
	TcmuVolumeName uuid.UUID           `help:"The name of the tcmu volume"`
}

func (*MountCmd) Run

func (cmd *MountCmd) Run(globals *Globals) error

type Percentage

type Percentage float64

type TreeCmd

type TreeCmd struct {
	Url  string `short:"u" help:"The URL of the vdisc" required:"true"`
	Path string `short:"p" help:"The path in the vdisc to list" default:"/"`
}

func (*TreeCmd) Run

func (cmd *TreeCmd) Run(globals *Globals) error

type VersionCmd

type VersionCmd struct{}

func (*VersionCmd) Run

func (cmd *VersionCmd) Run(globals *Globals) error

Jump to

Keyboard shortcuts

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