Documentation
¶
Index ¶
- Constants
- func DatasetDownloadFactory() (cli.Command, error)
- func DatasetFactory() (cli.Command, error)
- func DatasetListFactory() (cli.Command, error)
- func DatasetUploadFactory() (cli.Command, error)
- func ErrorCauser(err error) error
- func HandleError(err error) error
- func LoginFactory() (cli.Command, error)
- func NewClient(c *conf.Config, session *conf.Session, outputter *format.Outputter) (*v1batch.Client, error)
- func ProgressBar(w io.Writer, 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 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 WorkloadDescribeFactory() (cli.Command, error)
- func WorkloadDownloadFactory() (cli.Command, error)
- func WorkloadFactory() (cli.Command, error)
- func WorkloadListFactory() (cli.Command, error)
- func WorkloadStartFactory() (cli.Command, error)
- func WorkloadStopFactory() (cli.Command, error)
- func WorkloadWorkFactory() (cli.Command, error)
- type Chunker
- type ConfOpts
- type Dataset
- type DatasetList
- type Download
- type Login
- type OutputOpts
- type Project
- type ProjectExpel
- type ProjectList
- type ProjectPlace
- type ProjectPlaceOpts
- type ProjectSet
- type Task
- type TaskDescribe
- type TaskFailure
- type TaskHeartbeat
- type TaskList
- type TaskReceive
- type TaskStart
- type TaskStartOpts
- type TaskStop
- type TaskSuccess
- type Upload
- type Workload
- type WorkloadDescribe
- type WorkloadDownload
- type WorkloadList
- type WorkloadStart
- type WorkloadStartOpts
- type WorkloadStop
- type WorkloadWork
- type WorkloadWorkOpts
Constants ¶
const ( //EnvConfigJSON can be used to pass the config file as a json encoded string EnvConfigJSON = "NERD_CONFIG_JSON" //EnvNerdProject can be used to set the nerd project EnvNerdProject = "NERD_PROJECT" )
const ( //OutputDirPermissions are the output directory's permissions. OutputDirPermissions = 0755 //DownloadConcurrency is the amount of concurrent download threads. DownloadConcurrency = 64 )
const (
//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 DatasetListFactory ¶ added in v0.4.15
DatasetListFactory 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 ¶
HandleError handles the way errors are presented to the user.
func LoginFactory ¶
LoginFactory returns a factory method for the join command
func NewClient ¶
func NewClient(c *conf.Config, session *conf.Session, outputter *format.Outputter) (*v1batch.Client, error)
NewClient creates a new batch Client.
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 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 WorkloadDescribeFactory ¶ added in v0.4.15
WorkloadDescribeFactory returns a factory method for the join command
func WorkloadDownloadFactory ¶ added in v0.4.15
WorkloadDownloadFactory returns a factory method for the join command
func WorkloadFactory ¶ added in v0.4.15
WorkloadFactory returns a factory method for the join command
func WorkloadListFactory ¶ added in v0.4.15
WorkloadListFactory returns a factory method for the join command
func WorkloadStartFactory ¶ added in v0.4.15
WorkloadStartFactory returns a factory method for the join command
func WorkloadStopFactory ¶ added in v0.4.15
WorkloadStopFactory returns a factory method for the join command
func WorkloadWorkFactory ¶ added in v0.4.15
WorkloadWorkFactory 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 DatasetList ¶ added in v0.4.15
type DatasetList struct {
// contains filtered or unexported fields
}
DatasetList command
func (*DatasetList) DoRun ¶ added in v0.4.15
func (cmd *DatasetList) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (DatasetList) Help ¶ added in v0.4.15
func (c DatasetList) 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 {
Debug func(bool) `long:"debug" default:"false" optional:"true" optional-value:"true" description:"show debug output"`
Output func(string) `long:"output" default:"pretty" description:"[pretty|raw|json]"`
}
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.
func (*Project) HelpTemplate ¶ added in v0.4.15
HelpTemplate provides a template for the help command, which excludes the "expel" and "place" subcommands
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 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.
func (*Task) HelpTemplate ¶ added in v0.4.15
HelpTemplate provides a template for the help command, which excludes the "failure", "heartbeat", "receive", and "success" subcommands
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 Workload ¶ added in v0.4.15
type Workload struct {
// contains filtered or unexported fields
}
Workload command
func (Workload) Help ¶ added in v0.4.15
func (c Workload) 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.
func (*Workload) HelpTemplate ¶ added in v0.4.15
HelpTemplate provides a template for the help command, which excludes the "workload work" command
type WorkloadDescribe ¶ added in v0.4.15
type WorkloadDescribe struct {
// contains filtered or unexported fields
}
WorkloadDescribe command
func (*WorkloadDescribe) DoRun ¶ added in v0.4.15
func (cmd *WorkloadDescribe) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (WorkloadDescribe) Help ¶ added in v0.4.15
func (c WorkloadDescribe) 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 WorkloadDownload ¶ added in v0.4.15
type WorkloadDownload struct {
// contains filtered or unexported fields
}
WorkloadDownload command
func (*WorkloadDownload) DoRun ¶ added in v0.4.15
func (cmd *WorkloadDownload) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (WorkloadDownload) Help ¶ added in v0.4.15
func (c WorkloadDownload) 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 WorkloadList ¶ added in v0.4.15
type WorkloadList struct {
// contains filtered or unexported fields
}
WorkloadList command
func (*WorkloadList) DoRun ¶ added in v0.4.15
func (cmd *WorkloadList) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (WorkloadList) Help ¶ added in v0.4.15
func (c WorkloadList) 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 WorkloadStart ¶ added in v0.4.15
type WorkloadStart struct {
// contains filtered or unexported fields
}
WorkloadStart command
func (*WorkloadStart) DoRun ¶ added in v0.4.15
func (cmd *WorkloadStart) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (WorkloadStart) Help ¶ added in v0.4.15
func (c WorkloadStart) 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 WorkloadStartOpts ¶ added in v0.4.15
type WorkloadStartOpts struct {
Env []string `long:"env" short:"e" description:"environment variables"`
InputDataset string `long:"input-dataset" short:"d" description:"input dataset ID, will be available in /input in your container"`
Instances int `long:"instances" short:"i" default:"1" description:"number of working instances"`
}
WorkloadStartOpts describes command options
type WorkloadStop ¶ added in v0.4.15
type WorkloadStop struct {
// contains filtered or unexported fields
}
WorkloadStop command
func (*WorkloadStop) DoRun ¶ added in v0.4.15
func (cmd *WorkloadStop) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (WorkloadStop) Help ¶ added in v0.4.15
func (c WorkloadStop) 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 WorkloadWork ¶ added in v0.4.15
type WorkloadWork struct {
// contains filtered or unexported fields
}
WorkloadWork command
func (*WorkloadWork) DoRun ¶ added in v0.4.15
func (cmd *WorkloadWork) DoRun(args []string) (err error)
DoRun is called by run and allows an error to be returned
func (WorkloadWork) Help ¶ added in v0.4.15
func (c WorkloadWork) 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 WorkloadWorkOpts ¶ added in v0.4.15
type WorkloadWorkOpts struct {
EntrypointJSONB64 string `long:"entrypoint-json-base64" default:"W10=" description:"work entrypoint, first json and then base64 encoded"`
CmdJSONB64 string `long:"cmd-json-base64" default:"W10=" description:"work cmd, first json and then base64 encoded"`
OutputDir string `` /* 126-byte string literal not displayed */
}
WorkloadWorkOpts describes command options
Source Files
¶
- command.go
- dataset.go
- dataset_download.go
- dataset_list.go
- dataset_upload.go
- login.go
- opts.go
- project.go
- project_expel.go
- project_list.go
- project_place.go
- project_set.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
- workload.go
- workload_describe.go
- workload_download.go
- workload_list.go
- workload_start.go
- workload_stop.go
- workload_work.go