sandbox

package
v0.4.16 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfig = &Config{}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Source string `json:"source" pflag:",Path of your source code"`

	// Flytectl sandbox only supports flyte version available in Github release https://github.com/flyteorg/flyte/tags
	// Flytectl sandbox will only work for v0.10.0+
	// Default value dind represents the latest release
	Version string `json:"version" pflag:",Version of flyte. Only supports flyte releases greater than v0.10.0"`

	// Optionally it is possible to specify a specific fqn for the docker image with the tag. This should be
	// Flyte compliant sandbox image. Usually useful, if you want to push the image to your own registry and relaunch
	// from there.
	Image string `json:"image" pflag:",Optional. Provide a fully qualified path to a Flyte compliant docker image."`

	// Optionally it is possible to use local sandbox image
	// If local flag pass then flytectl will not pull image from registry. Usually useful, if you want to test your local images without pushing them to a registry
	ImagePullPolicy ImagePullPolicy `json:"imagePullPolicy" pflag:",Optional. Defines the image pull behavior [Always/IfNotPresent/Never]"`
}

Config holds configuration flags for sandbox command.

func (Config) GetPFlagSet

func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet

GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the flags is json-name.json-sub-name... etc.

type ImagePullPolicy added in v0.3.23

type ImagePullPolicy int
const (
	ImagePullPolicyAlways ImagePullPolicy = iota
	ImagePullPolicyIfNotPresent
	ImagePullPolicyNever
)

func ImagePullPolicyString added in v0.3.23

func ImagePullPolicyString(s string) (ImagePullPolicy, error)

ImagePullPolicyString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func ImagePullPolicyValues added in v0.3.23

func ImagePullPolicyValues() []ImagePullPolicy

ImagePullPolicyValues returns all values of the enum

func (ImagePullPolicy) IsAImagePullPolicy added in v0.3.23

func (i ImagePullPolicy) IsAImagePullPolicy() bool

IsAImagePullPolicy returns "true" if the value is listed in the enum definition. "false" otherwise

func (ImagePullPolicy) MarshalJSON added in v0.3.23

func (i ImagePullPolicy) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for ImagePullPolicy

func (*ImagePullPolicy) Set added in v0.3.23

func (i *ImagePullPolicy) Set(val string) error

Set implements PFlag's Value interface to attempt to set the value of the flag from string.

func (ImagePullPolicy) String added in v0.3.23

func (i ImagePullPolicy) String() string

func (ImagePullPolicy) Type added in v0.3.23

func (i ImagePullPolicy) Type() string

Type implements PFlag's Value interface to return type name.

func (*ImagePullPolicy) UnmarshalJSON added in v0.3.23

func (i *ImagePullPolicy) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for ImagePullPolicy

Jump to

Keyboard shortcuts

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