cliflags

package
v1.5.0-alpha9 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NameUsageMsg = `The name to refer to this task by`

	PublisherInputUsageMsg = `` /* 438-byte string literal not displayed */

	ResultPathUsageMsg = "name=path of the output data volumes. 'outputs:/outputs' is always added unless " +
		"'/outputs' is mapped to a different name."

	PublisherUsageMsg = `Where to publish the result of the job`

	ResourceCPUUsageMsg    = `Job CPU cores (e.g. 500m, 2, 8).`
	ResourceMemoryUsageMsg = `Job Memory requirement (e.g. 500Mb, 2Gb, 8Gb).`
	ResourceDiskUsageMsg   = `Job Disk requirement (e.g. 500Gb, 2Tb, 8Tb).`
	ResourceGPUUsageMsg    = `Job GPU requirement (e.g. 1, 2, 8).`

	NetworkTypeUsageMsg   = `Networking capability required by the job. None, HTTP, or Full`
	NetworkDomainUsageMsg = `Domain(s) that the job needs to access (for HTTP networking)`
)
View Source
const DefaultRunWaitSeconds = 600
View Source
const RootCommandConfigFiles = "Root.Command.Config.Files"
View Source
const RootCommandConfigFlags = "Root.Command.Config.Flags"
View Source
const RootCommandConfigValues = "Root.Command.Config.Values"

Variables

This section is empty.

Functions

func ConfigAutoComplete added in v1.5.0

func ConfigAutoComplete(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

ConfigAutoComplete provides auto-completion suggestions for configuration keys.

func ListFlags added in v1.1.0

func ListFlags(options *ListOptions) *pflag.FlagSet

func NewDownloadFlags

func NewDownloadFlags(settings *DownloaderSettings) *pflag.FlagSet

func NewRunTimeSettingsFlags

func NewRunTimeSettingsFlags(settings *RunTimeSettings) *pflag.FlagSet

func OutputFormatFlags

func OutputFormatFlags(format *output.OutputOptions) *pflag.FlagSet

func OutputNonTabularFormatFlags added in v1.1.0

func OutputNonTabularFormatFlags(format *output.NonTabularOutputOptions) *pflag.FlagSet

func RegisterJobFlags added in v1.4.0

func RegisterJobFlags(cmd *cobra.Command, s *JobSettings)

func RegisterTaskFlags added in v1.4.0

func RegisterTaskFlags(cmd *cobra.Command, s *TaskSettings)

Types

type ConfigFlag added in v1.5.0

type ConfigFlag struct {
	Value string
	// contains filtered or unexported fields
}

func NewConfigFlag added in v1.5.0

func NewConfigFlag() *ConfigFlag

func NewWriteConfigFlag added in v1.5.0

func NewWriteConfigFlag() *ConfigFlag

func (*ConfigFlag) Parse added in v1.5.0

func (cf *ConfigFlag) Parse() error

func (*ConfigFlag) Set added in v1.5.0

func (cf *ConfigFlag) Set(value string) error

func (*ConfigFlag) String added in v1.5.0

func (cf *ConfigFlag) String() string

func (*ConfigFlag) Type added in v1.5.0

func (cf *ConfigFlag) Type() string

type DownloaderSettings

type DownloaderSettings struct {
	Timeout    time.Duration
	OutputDir  string
	SingleFile string
	Raw        bool
}

func NewDefaultDownloaderSettings

func NewDefaultDownloaderSettings() *DownloaderSettings

type JobSettings added in v1.4.0

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

func DefaultJobSettings added in v1.4.0

func DefaultJobSettings() *JobSettings

func (*JobSettings) Constraints added in v1.4.0

func (j *JobSettings) Constraints() ([]*models.LabelSelectorRequirement, error)

func (*JobSettings) Count added in v1.4.0

func (j *JobSettings) Count() int

func (*JobSettings) Labels added in v1.4.0

func (j *JobSettings) Labels() (map[string]string, error)

TODO(forrest): based on a conversation with walid we should be returning an error here if at anypoint if a label if provided that is invalid. We cannont remove them as we did previously.

func (*JobSettings) Name added in v1.4.0

func (j *JobSettings) Name() string

func (*JobSettings) Namespace added in v1.4.0

func (j *JobSettings) Namespace() string

func (*JobSettings) Priority added in v1.4.0

func (j *JobSettings) Priority() int

func (*JobSettings) Type added in v1.4.0

func (j *JobSettings) Type() string

type LegacyJobFlags added in v1.4.0

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

type ListOptions added in v1.1.0

type ListOptions struct {
	Limit         uint32
	NextToken     string
	OrderBy       string
	OrderByFields []string
	Reverse       bool
}

type NetworkSettings added in v1.4.0

type NetworkSettings struct {
	Network models.Network
	Domains []string
}

type ResourceSettings added in v1.4.0

type ResourceSettings struct {
	CPU    string
	Memory string
	Disk   string
	GPU    string
}

type RunTimeSettings

type RunTimeSettings struct {
	WaitForJobToFinish    bool // Wait for the job to finish before returning
	WaitForJobTimeoutSecs int  // Timeout for waiting for the job to finish
	PrintJobIDOnly        bool // Only print the Job ID as output
	PrintNodeDetails      bool
	Follow                bool // Follow along with the output of the job
	DryRun                bool // iff true do not submit the job, but instead print out what will be submitted.
	GroupEvents           bool // Group events by execution
}

func DefaultRunTimeSettings added in v1.1.0

func DefaultRunTimeSettings() *RunTimeSettings

type TaskSettings added in v1.4.0

type TaskSettings struct {
	Name                 string
	InputSources         opts.StorageSpecConfigOpt
	ResultPaths          []*models.ResultPath
	EnvironmentVariables map[string]string
	Publisher            opts.PublisherSpecConfigOpt
	Resources            ResourceSettings
	Network              NetworkSettings
	Timeout              int64
	QueueTimeout         int64
}

func DefaultTaskSettings added in v1.4.0

func DefaultTaskSettings() *TaskSettings

Jump to

Keyboard shortcuts

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