Documentation
¶
Index ¶
- Constants
- func DatasetDownloadFactory() (cli.Command, error)
- func DatasetFactory() (cli.Command, error)
- func DatasetUploadFactory() (cli.Command, error)
- func ErrorCauser(err error) error
- func HandleError(err error)
- func LoginFactory() (cli.Command, error)
- func NewClient(ui cli.Ui, c *conf.Config, session *conf.Session) (*v1batch.Client, error)
- func ProgressBar(total int64, progressCh <-chan int64, doneCh chan<- struct{})
- func ProjectExpelFactory() (cli.Command, error)
- func ProjectFactory() (cli.Command, error)
- func ProjectListFactory() (cli.Command, error)
- func ProjectPlaceFactory() (cli.Command, error)
- func ProjectSetFactory() (cli.Command, error)
- func QueueCreateFactory() (cli.Command, error)
- func QueueDeleteFactory() (cli.Command, error)
- func QueueDescribeFactory() (cli.Command, error)
- func QueueFactory() (cli.Command, error)
- func QueueListFactory() (cli.Command, error)
- func TaskDescribeFactory() (cli.Command, error)
- func TaskFactory() (cli.Command, error)
- func TaskFailureFactory() (cli.Command, error)
- func TaskHeartbeatFactory() (cli.Command, error)
- func TaskListFactory() (cli.Command, error)
- func TaskReceiveFactory() (cli.Command, error)
- func TaskStartFactory() (cli.Command, error)
- func TaskStopFactory() (cli.Command, error)
- func TaskSuccessFactory() (cli.Command, error)
- func UserPassProvider(ui cli.Ui) func() (string, string, error)
- func WorkerFactory() (cli.Command, error)
- func WorkerListFactory() (cli.Command, error)
- func WorkerStartFactory() (cli.Command, error)
- func WorkerStopFactory() (cli.Command, error)
- func WorkerWorkFactory() (cli.Command, error)
- type Chunker
- type ConfOpts
- type Dataset
- type Download
- type Login
- type OutputOpts
- type Project
- type ProjectExpel
- type ProjectList
- type ProjectPlace
- type ProjectPlaceOpts
- type ProjectSet
- type Queue
- type QueueCreate
- type QueueDelete
- type QueueDescribe
- type QueueList
- type Task
- type TaskDescribe
- type TaskFailure
- type TaskHeartbeat
- type TaskList
- type TaskReceive
- type TaskStart
- type TaskStartOpts
- type TaskStop
- type TaskSuccess
- type Upload
- type UploadOpts
- type Worker
- type WorkerList
- type WorkerStart
- type WorkerStartOpts
- type WorkerStop
- type WorkerWork
- type WorkerWorkOpts
Constants ¶
const ( EnvConfigJSON = "NERD_CONFIG_JSON" EnvNerdProject = "NERD_PROJECT" )
const ( //OutputDirPermissions are the output directory's permissions. OutputDirPermissions = 0755 //DownloadConcurrency is the amount of concurrent download threads. DownloadConcurrency = 64 //DatasetPrefix is the prefix of each dataset ID. DatasetPrefix = "d-" //TagPrefix is the prefix of a tag identifier TagPrefix = "tag-" )
const ( //DatasetFilename is the filename of the file that contains the dataset ID in the data folder. DatasetFilename = ".dataset" //DatasetPermissions are the permissions for DatasetFilename DatasetPermissions = 0644 //UploadConcurrency is the amount of concurrent upload threads. UploadConcurrency = 64 )
Variables ¶
This section is empty.
Functions ¶
func DatasetDownloadFactory ¶ added in v0.4.12
DatasetDownloadFactory returns a factory method for the join command
func DatasetFactory ¶ added in v0.4.12
DatasetFactory returns a factory method for the join command
func DatasetUploadFactory ¶ added in v0.4.12
DatasetUploadFactory returns a factory method for the join command
func ErrorCauser ¶
ErrorCauser returns the error that is one level up in the error chain.
func HandleError ¶
func HandleError(err error)
HandleError handles the way errors are presented to the user.
func LoginFactory ¶
LoginFactory returns a factory method for the join command
func ProgressBar ¶ added in v0.4.12
ProgressBar creates a new CLI progess bar and adds input from the progressCh to the bar.
func ProjectExpelFactory ¶ added in v0.4.12
ProjectExpelFactory returns a factory method for the join command
func ProjectFactory ¶ added in v0.4.12
ProjectFactory returns a factory method for the join command
func ProjectListFactory ¶ added in v0.4.12
ProjectListFactory returns a factory method for the join command
func ProjectPlaceFactory ¶ added in v0.4.12
ProjectPlaceFactory returns a factory method for the join command
func ProjectSetFactory ¶ added in v0.4.12
ProjectSetFactory returns a factory method for the join command
func QueueCreateFactory ¶ added in v0.4.12
QueueCreateFactory returns a factory method for the join command
func QueueDeleteFactory ¶ added in v0.4.12
QueueDeleteFactory returns a factory method for the join command
func QueueDescribeFactory ¶ added in v0.4.12
QueueDescribeFactory returns a factory method for the join command
func QueueFactory ¶ added in v0.4.12
QueueFactory returns a factory method for the join command
func QueueListFactory ¶ added in v0.4.12
QueueListFactory returns a factory method for the join command
func TaskDescribeFactory ¶ added in v0.4.12
TaskDescribeFactory returns a factory method for the join command
func TaskFactory ¶ added in v0.4.12
TaskFactory returns a factory method for the join command
func TaskFailureFactory ¶ added in v0.4.12
TaskFailureFactory returns a factory method for the join command
func TaskHeartbeatFactory ¶ added in v0.4.12
TaskHeartbeatFactory returns a factory method for the join command
func TaskListFactory ¶ added in v0.4.12
TaskListFactory returns a factory method for the join command
func TaskReceiveFactory ¶ added in v0.4.12
TaskReceiveFactory returns a factory method for the join command
func TaskStartFactory ¶ added in v0.4.12
TaskStartFactory returns a factory method for the join command
func TaskStopFactory ¶ added in v0.4.12
TaskStopFactory returns a factory method for the join command
func TaskSuccessFactory ¶ added in v0.4.12
TaskSuccessFactory returns a factory method for the join command
func UserPassProvider ¶ added in v0.1.1
UserPassProvider prompts the username and password on stdin.
func WorkerFactory ¶ added in v0.4.12
WorkerFactory returns a factory method for the join command
func WorkerListFactory ¶ added in v0.4.12
WorkerListFactory returns a factory method for the join command
func WorkerStartFactory ¶ added in v0.4.12
WorkerStartFactory returns a factory method for the join command
func WorkerStopFactory ¶ added in v0.4.12
WorkerStopFactory returns a factory method for the join command
func WorkerWorkFactory ¶ added in v0.4.12
WorkerWorkFactory returns a factory method for the join command
Types ¶
type Chunker ¶ added in v0.4.12
type Chunker struct {
// contains filtered or unexported fields
}
Chunker is a wrapper of the restic/chunker library, to make it compatible with the v1data.Chunker interface.
func NewChunker ¶ added in v0.4.12
NewChunker returns a new Chunker
type ConfOpts ¶
type ConfOpts struct {
ConfigFile func(string) `long:"config-file" default:"" default-mask:"" env:"NERD_CONFIG_FILE" description:"location of config file"`
SessionFile func(string) `long:"session-file" default:"" default-mask:"" env:"NERD_SESSION_FILE" description:"location of session file"`
OutputOpts
}
ConfOpts are the options related to config file and the way output is handled.
type Dataset ¶ added in v0.4.12
type Dataset struct {
// contains filtered or unexported fields
}
Dataset command
func (Dataset) Help ¶ added in v0.4.12
func (c Dataset) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type Download ¶
type Download struct {
// contains filtered or unexported fields
}
Download command
func (Download) Help ¶
func (c Download) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type Login ¶
type Login struct {
// contains filtered or unexported fields
}
Login command
func (Login) Help ¶
func (c Login) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type OutputOpts ¶
type OutputOpts struct {
VerboseOutput func(bool) `short:"v" long:"verbose" default:"false" optional:"true" optional-value:"true" description:"show verbose output"`
JSONOutput func(bool) `long:"json-format" default:"false" optional:"true" optional-value:"true" description:"show output in json format"`
}
OutputOpts are options that are related to CLI output.
type Project ¶ added in v0.4.12
type Project struct {
// contains filtered or unexported fields
}
Project command
func (Project) Help ¶ added in v0.4.12
func (c Project) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type ProjectExpel ¶ added in v0.4.12
type ProjectExpel struct {
// contains filtered or unexported fields
}
ProjectExpel command
func (*ProjectExpel) DoRun ¶ added in v0.4.12
func (cmd *ProjectExpel) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (ProjectExpel) Help ¶ added in v0.4.12
func (c ProjectExpel) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type ProjectList ¶ added in v0.4.12
type ProjectList struct {
// contains filtered or unexported fields
}
ProjectList command
func (*ProjectList) DoRun ¶ added in v0.4.12
func (cmd *ProjectList) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (ProjectList) Help ¶ added in v0.4.12
func (c ProjectList) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type ProjectPlace ¶ added in v0.4.12
type ProjectPlace struct {
// contains filtered or unexported fields
}
ProjectPlace command
func (*ProjectPlace) DoRun ¶ added in v0.4.12
func (cmd *ProjectPlace) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (ProjectPlace) Help ¶ added in v0.4.12
func (c ProjectPlace) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type ProjectPlaceOpts ¶ added in v0.4.12
type ProjectPlaceOpts struct {
Token string `long:"token" default:"" default-mask:"" description:"placement that authenticates using JWT"`
Username string `long:"username" default:"" default-mask:"" description:"username for placement that authenticates using username/password"`
Password string `long:"password" default:"" default-mask:"" description:"password for placement that authenticates using username/password"`
Insecure bool `long:"insecure" default-mask:"" description:"disable checking of server certificate"`
}
ProjectPlaceOpts describes command options
type ProjectSet ¶ added in v0.4.12
type ProjectSet struct {
// contains filtered or unexported fields
}
ProjectSet command
func (*ProjectSet) DoRun ¶ added in v0.4.12
func (cmd *ProjectSet) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (ProjectSet) Help ¶ added in v0.4.12
func (c ProjectSet) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type Queue ¶ added in v0.4.12
type Queue struct {
// contains filtered or unexported fields
}
Queue command
func (Queue) Help ¶ added in v0.4.12
func (c Queue) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type QueueCreate ¶ added in v0.4.12
type QueueCreate struct {
// contains filtered or unexported fields
}
QueueCreate command
func (*QueueCreate) DoRun ¶ added in v0.4.12
func (cmd *QueueCreate) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (QueueCreate) Help ¶ added in v0.4.12
func (c QueueCreate) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type QueueDelete ¶ added in v0.4.12
type QueueDelete struct {
// contains filtered or unexported fields
}
QueueDelete command
func (*QueueDelete) DoRun ¶ added in v0.4.12
func (cmd *QueueDelete) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (QueueDelete) Help ¶ added in v0.4.12
func (c QueueDelete) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type QueueDescribe ¶ added in v0.4.12
type QueueDescribe struct {
// contains filtered or unexported fields
}
QueueDescribe command
func (*QueueDescribe) DoRun ¶ added in v0.4.12
func (cmd *QueueDescribe) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (QueueDescribe) Help ¶ added in v0.4.12
func (c QueueDescribe) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type QueueList ¶ added in v0.4.12
type QueueList struct {
// contains filtered or unexported fields
}
QueueList command
func (*QueueList) DoRun ¶ added in v0.4.12
DoRun is called by run and allows an error to be returned
func (QueueList) Help ¶ added in v0.4.12
func (c QueueList) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type Task ¶ added in v0.4.12
type Task struct {
// contains filtered or unexported fields
}
Task command
func (Task) Help ¶ added in v0.4.12
func (c Task) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type TaskDescribe ¶ added in v0.4.12
type TaskDescribe struct {
// contains filtered or unexported fields
}
TaskDescribe command
func (*TaskDescribe) DoRun ¶ added in v0.4.12
func (cmd *TaskDescribe) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (TaskDescribe) Help ¶ added in v0.4.12
func (c TaskDescribe) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type TaskFailure ¶ added in v0.4.12
type TaskFailure struct {
// contains filtered or unexported fields
}
TaskFailure command
func (*TaskFailure) DoRun ¶ added in v0.4.12
func (cmd *TaskFailure) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (TaskFailure) Help ¶ added in v0.4.12
func (c TaskFailure) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type TaskHeartbeat ¶ added in v0.4.12
type TaskHeartbeat struct {
// contains filtered or unexported fields
}
TaskHeartbeat command
func (*TaskHeartbeat) DoRun ¶ added in v0.4.12
func (cmd *TaskHeartbeat) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (TaskHeartbeat) Help ¶ added in v0.4.12
func (c TaskHeartbeat) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type TaskList ¶ added in v0.4.12
type TaskList struct {
// contains filtered or unexported fields
}
TaskList command
func (TaskList) Help ¶ added in v0.4.12
func (c TaskList) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type TaskReceive ¶ added in v0.4.12
type TaskReceive struct {
// contains filtered or unexported fields
}
TaskReceive command
func (*TaskReceive) DoRun ¶ added in v0.4.12
func (cmd *TaskReceive) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (TaskReceive) Help ¶ added in v0.4.12
func (c TaskReceive) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type TaskStart ¶ added in v0.4.12
type TaskStart struct {
// contains filtered or unexported fields
}
TaskStart command
func (*TaskStart) DoRun ¶ added in v0.4.12
DoRun is called by run and allows an error to be returned
func (TaskStart) Help ¶ added in v0.4.12
func (c TaskStart) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type TaskStartOpts ¶ added in v0.4.12
type TaskStartOpts struct {
Env []string `long:"env" short:"e" description:"environment variables to"`
}
TaskStartOpts describes command options
type TaskStop ¶ added in v0.4.12
type TaskStop struct {
// contains filtered or unexported fields
}
TaskStop command
func (TaskStop) Help ¶ added in v0.4.12
func (c TaskStop) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type TaskSuccess ¶ added in v0.4.12
type TaskSuccess struct {
// contains filtered or unexported fields
}
TaskSuccess command
func (*TaskSuccess) DoRun ¶ added in v0.4.12
func (cmd *TaskSuccess) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (TaskSuccess) Help ¶ added in v0.4.12
func (c TaskSuccess) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type Upload ¶
type Upload struct {
// contains filtered or unexported fields
}
Upload command
func (Upload) Help ¶
func (c Upload) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type UploadOpts ¶
type UploadOpts struct {
Tag string `long:"tag" default:"" default-mask:"" description:"use a tag to logically group datasets"`
}
UploadOpts describes command options
type Worker ¶ added in v0.4.12
type Worker struct {
// contains filtered or unexported fields
}
Worker command
func (Worker) Help ¶ added in v0.4.12
func (c Worker) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type WorkerList ¶ added in v0.4.12
type WorkerList struct {
// contains filtered or unexported fields
}
WorkerList command
func (*WorkerList) DoRun ¶ added in v0.4.12
func (cmd *WorkerList) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (WorkerList) Help ¶ added in v0.4.12
func (c WorkerList) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type WorkerStart ¶ added in v0.4.12
type WorkerStart struct {
// contains filtered or unexported fields
}
WorkerStart command
func (*WorkerStart) DoRun ¶ added in v0.4.12
func (cmd *WorkerStart) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (WorkerStart) Help ¶ added in v0.4.12
func (c WorkerStart) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type WorkerStartOpts ¶ added in v0.4.12
type WorkerStartOpts struct {
Env []string `long:"env" short:"e" description:"environment variables"`
InputDataset string `long:"input-dataset" short:"i" description:"input dataset ID, will be available in /input in your container"`
}
WorkerStartOpts describes command options
type WorkerStop ¶ added in v0.4.12
type WorkerStop struct {
// contains filtered or unexported fields
}
WorkerStop command
func (*WorkerStop) DoRun ¶ added in v0.4.12
func (cmd *WorkerStop) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (WorkerStop) Help ¶ added in v0.4.12
func (c WorkerStop) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type WorkerWork ¶ added in v0.4.12
type WorkerWork struct {
// contains filtered or unexported fields
}
WorkerWork command
func (*WorkerWork) DoRun ¶ added in v0.4.12
func (cmd *WorkerWork) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (WorkerWork) Help ¶ added in v0.4.12
func (c WorkerWork) Help() string
Will write help text for when a user uses --help, it automatically renders all option groups of the flags.Parser (augmented with default values). It will show an extended help message if it is not empty, else it shows the synopsis.
type WorkerWorkOpts ¶ added in v0.4.12
type WorkerWorkOpts struct {
UploadTag string `` /* 140-byte string literal not displayed */
OutputDir string `` /* 152-byte string literal not displayed */
}
WorkerWorkOpts describes command options
Source Files
¶
- command.go
- dataset.go
- dataset_download.go
- dataset_upload.go
- login.go
- opts.go
- project.go
- project_expel.go
- project_list.go
- project_place.go
- project_set.go
- queue.go
- queue_create.go
- queue_delete.go
- queue_describe.go
- queue_list.go
- task.go
- task_describe.go
- task_failure.go
- task_heartbeat.go
- task_list.go
- task_receive.go
- task_start.go
- task_stop.go
- task_success.go
- utils.go
- worker.go
- worker_list.go
- worker_start.go
- worker_stop.go
- worker_work.go