libcasutil

package
v0.0.0-...-c07845e Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2015 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const ClearHelpText = `Usage: casutil clear [--shred]
	Removes all CAS blocks.
`
View Source
const CpHelpText = `Usage: casutil cp <addr>...
	Copies the specified blocks from one CAS to another.
`
View Source
const GetHelpText = `` /* 290-byte string literal not displayed */
View Source
const GrepHelpText = `` /* 221-byte string literal not displayed */
View Source
const HelpHelpText = `Usage: casutil help [<topic>]
	Prints help text on the requested topic.
`
View Source
const LsHelpText = `Usage: casutil ls [-0]
	Lists all CAS blocks.
`
View Source
const PutHelpText = `` /* 252-byte string literal not displayed */
View Source
const RmHelpText = `` /* 131-byte string literal not displayed */
View Source
const ScriptHelpText = `Usage: casutil script [-x] <filename>...
Usage: ... | casutil script [-x] -
	Executes commands from the named file.
`
View Source
const StatfsHelpText = `Usage: casutil statfs
Usage: casutil stat
	Displays information about the size and health of a CAS backend.
`

Variables

This section is empty.

Functions

func ClearAddFlags

func ClearAddFlags(fs *flag.FlagSet) interface{}

func ClearCmd

func ClearCmd(d *Dispatcher, ctx context.Context, args []string, fval interface{}) int

func CpAddFlags

func CpAddFlags(fs *flag.FlagSet) interface{}

func CpCmd

func CpCmd(d *Dispatcher, ctx context.Context, args []string, fval interface{}) int

func GetAddFlags

func GetAddFlags(fs *flag.FlagSet) interface{}

func GetCmd

func GetCmd(d *Dispatcher, ctx context.Context, args []string, fval interface{}) int

func GrepAddFlags

func GrepAddFlags(fs *flag.FlagSet) interface{}

func GrepCmd

func GrepCmd(d *Dispatcher, ctx context.Context, args []string, fval interface{}) int

func HelpAddFlags

func HelpAddFlags(_ *flag.FlagSet) interface{}

func HelpCmd

func HelpCmd(d *Dispatcher, ctx context.Context, args []string, _ interface{}) int

func LsAddFlags

func LsAddFlags(fs *flag.FlagSet) interface{}

func LsCmd

func LsCmd(d *Dispatcher, ctx context.Context, args []string, fval interface{}) int

func PutAddFlags

func PutAddFlags(fs *flag.FlagSet) interface{}

func PutCmd

func PutCmd(d *Dispatcher, ctx context.Context, args []string, fval interface{}) int

func RmAddFlags

func RmAddFlags(fs *flag.FlagSet) interface{}

func RmCmd

func RmCmd(d *Dispatcher, ctx context.Context, args []string, fval interface{}) int

func ScriptAddFlags

func ScriptAddFlags(fs *flag.FlagSet) interface{}

func ScriptCmd

func ScriptCmd(d *Dispatcher, ctx context.Context, args []string, fval interface{}) int

func StatfsAddFlags

func StatfsAddFlags(fs *flag.FlagSet) interface{}

func StatfsCmd

func StatfsCmd(d *Dispatcher, ctx context.Context, args []string, fval interface{}) int

Types

type AddFlagsFunc

type AddFlagsFunc func(*flag.FlagSet) interface{}

type ClearFlags

type ClearFlags struct {
	Backend string
	Shred   bool
}

type CpFlags

type CpFlags struct {
	Backend string
	Source  string
}

type Dispatch

type Dispatch struct {
	Name     string
	Help     string
	Run      RunFunc
	AddFlags AddFlagsFunc
	Hidden   bool
}

type Dispatcher

type Dispatcher struct {
	Dispatches  []Dispatch
	GlobalFlags *flag.FlagSet
	GlobalHelp  string
	RootContext context.Context
	In          io.Reader
	Out         io.Writer
	Err         io.Writer
	Timeout     time.Duration
	Backend     string
	Source      string
}

func NewDispatcher

func NewDispatcher(help string) *Dispatcher

func (*Dispatcher) AddAlias

func (d *Dispatcher) AddAlias(alias, name string)

func (*Dispatcher) AddCommand

func (d *Dispatcher) AddCommand(name, help string, runfn RunFunc, flagfn AddFlagsFunc)

func (*Dispatcher) AddTopic

func (d *Dispatcher) AddTopic(name, help string)

func (*Dispatcher) Dispatch

func (d *Dispatcher) Dispatch(args []string) int

func (*Dispatcher) Error

func (d *Dispatcher) Error(a ...interface{})

func (*Dispatcher) Errorf

func (d *Dispatcher) Errorf(format string, a ...interface{})

func (*Dispatcher) Info

func (d *Dispatcher) Info(a ...interface{})

func (*Dispatcher) Infof

func (d *Dispatcher) Infof(format string, a ...interface{})

func (*Dispatcher) Print

func (d *Dispatcher) Print(a ...interface{})

func (*Dispatcher) Printerr

func (d *Dispatcher) Printerr(a ...interface{})

func (*Dispatcher) Printerrf

func (d *Dispatcher) Printerrf(format string, a ...interface{})

func (*Dispatcher) Printerrln

func (d *Dispatcher) Printerrln(a ...interface{})

func (*Dispatcher) Printf

func (d *Dispatcher) Printf(format string, a ...interface{})

func (*Dispatcher) Println

func (d *Dispatcher) Println(a ...interface{})

func (*Dispatcher) Warning

func (d *Dispatcher) Warning(a ...interface{})

func (*Dispatcher) Warningf

func (d *Dispatcher) Warningf(format string, a ...interface{})

type GetFlags

type GetFlags struct {
	Backend  string
	TrimZero bool
}

type GrepFlags

type GrepFlags struct {
	Backend string
}

type LsFlags

type LsFlags struct {
	Backend string
	Zero    bool
}

type PutFlags

type PutFlags struct {
	Backend string
}

type RmFlags

type RmFlags struct {
	Backend string
	Shred   bool
}

type RunFunc

type RunFunc func(*Dispatcher, context.Context, []string, interface{}) int

type ScriptFlags

type ScriptFlags struct {
	Trace bool
}

type StatfsFlags

type StatfsFlags struct {
	Backend string
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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