Documentation
¶
Index ¶
Constants ¶
const SupportedSpecVersions = "v0.6.0"
SupportedSpecVersions indicates the version(s) of the DrakeSpec that is/are supported by this package.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CPU ¶ added in v0.11.0
type CPU interface { // RequestedMillicores returns the requested number of CPU millicores for use // by the container. RequestedMillicores() int // MaxMillicores returns the maximum number of CPU millicores usable by // the container. MaxMillicores() int }
CPU is a public interface for container CPU configuration.
type CPUArch ¶ added in v0.14.0
type CPUArch string
CPUArch represents CPU architecture
const ( // CPUArchAMD64 represents amd64 CPU architecture CPUArchAMD64 CPUArch = "amd64" )
type Config ¶
type Config interface { // AllJobs returns a list of all Jobs AllJobs() []Job // Jobs returns an ordered list of Jobs given the provided jobNames. Jobs(jobNames ...string) ([]Job, error) // AllPipelines returns a list of all Pipelines AllPipelines() []Pipeline // Pipelines returns an ordered list of Pipelines given the provided // pipelineNames. Pipelines(pipelineNames ...string) ([]Pipeline, error) }
Config is a public interface for the root of the Drake configuration tree.
func NewConfigFromFile ¶
NewConfigFromFile loads configuration from the specified path and returns it.
func NewConfigFromYAML ¶ added in v0.3.0
NewConfigFromYAML loads configuration from the specified YAML bytes.
type Container ¶
type Container interface { // Name returns the container's name Name() string // Image returns the name of the OCI image used by the container Image() string // ImagePullPolicy returns the name of the pull policy, which indicates // whether to settle for existing images (if they already exist) or attempt // to refresh them by re-pulling ImagePullPolicy() ImagePullPolicy // Environment returns container-specific environment variables Environment() []string // WorkingDirectory returns the container's working directory WorkingDirectory() string // Command returns the command (entrypoint) that should be run in the // container Command() []string // Args returns the arguments for the command Args() []string // TTY returns an indicator of whether the container should use TTY or not TTY() bool // Privileged returns an indicator of whether the container should be // privileged Privileged() bool // MountDockerSocket returns an indicator of whether the container should // mount the Docker socket or not MountDockerSocket() bool // SourceMountPath returns a path to where project source should be mounted // into the container SourceMountPath() string // mounted into the container SharedStorageMountPath() string // Returns the resource configuration (CPU and memory) for the container Resources() Resources }
Container is a public interface for container configuration.
type ImagePullPolicy ¶ added in v0.12.0
type ImagePullPolicy string
const ( ImagePullPolicyIfNotPresent ImagePullPolicy = "IfNotPresent" ImagePullPolicyAlways ImagePullPolicy = "Always" )
type Job ¶
type Job interface { // Name returns the job's name Name() string // PrimaryContainer returns this job's primary container PrimaryContainer() Container // SidecarContainers returns this job's sidecar containers SidecarContainers() []Container // SourceMountMode returns the job's SourceMountMode SourceMountMode() SourceMountMode // OSFamily returns the job's OSFamily OSFamily() OSFamily // CPUArch returns the job's CPU architecture CPUArch() CPUArch }
Job is a public interface for job configuration.
type Memory ¶ added in v0.11.0
type Memory interface { // RequestedMegabytes returns the requested amount of memory (in megabytes) // for use by the container. RequestedMegabytes() int // MaxMegabytes returns the maximum amount of memory (in megabytes) usable // by the container. MaxMegabytes() int }
Memory is a public interface for container memory configuration.
type OSFamily ¶ added in v0.13.0
type OSFamily string
OSFamily represents the supported kernels-- linux and windows
type Pipeline ¶
type Pipeline interface { // Name returns the pipeline's name Name() string // Triggers returns all the triggers that can trigger the pipeline Triggers() []PipelineTrigger // Jobs returns all the jobs that comprise the pipeline Jobs() []PipelineJob }
Pipeline is a public interface for pipeline configuration.
type PipelineJob ¶ added in v0.2.0
type PipelineJob interface { Job() Job Dependencies() []PipelineJob }
PipelineJob is a public interface for a job in a pipeline.
type PipelineTrigger ¶ added in v0.4.0
PipelineTrigger is the public interface for a pipeline trigger.
type Resources ¶ added in v0.11.0
type Resources interface { // CPU returns container CPU configuration CPU() CPU // Memory returns container memory configuration Memory() Memory }
Resources is a public interface for container resource configuration.
type SourceMountMode ¶ added in v0.7.0
type SourceMountMode string
SourceMountMode represents the different methods for mounting source code into an OCI container
const ( // SourceMountModeReadOnly represents source code mounted in read-only fashion SourceMountModeReadOnly SourceMountMode = "RO" // SourceMountModeCopy represents source code mounted as a writable copy SourceMountModeCopy SourceMountMode = "COPY" // SourceMountModeReadWrite represents source code mounted in a writeable // fashion SourceMountModeReadWrite SourceMountMode = "RW" )