Documentation ¶
Index ¶
- Variables
- func CreateTempArchive(dir string) (string, error)
- func RetrieveAgentBinary(ctx context.Context, agentVersion string, agentOS string, ...) (string, error)
- func RunContainerizedAgent(ctx context.Context, config *RunConfig, params *Params) error
- type ContainerInstance
- type Instance
- type Params
- type PersistentWorkerInstance
- type PipeInstance
- type PipeStage
- type PrebuiltInstance
- type RunConfig
- type Volume
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFailedToCreateInstance = errors.New("failed to create instance") ErrUnsupportedInstance = errors.New("unsupported instance type") ErrAdditionalContainerFailed = errors.New("additional container failed") )
View Source
var ( ErrPopulateFailed = errors.New("failed to populate working directory") ErrAgentDownloadFailed = errors.New("failed to download agent") )
View Source
var ( ErrVolumeCreationFailed = errors.New("working volume creation failed") ErrVolumeCleanupFailed = errors.New("failed to clean up working volume") )
View Source
var ErrPipeCreationFailed = errors.New("failed to create pipe instance")
Functions ¶
func CreateTempArchive ¶ added in v0.3.0
func RetrieveAgentBinary ¶ added in v0.16.0
Types ¶
type ContainerInstance ¶ added in v0.3.0
type ContainerInstance struct { Image string CPU float32 Memory uint32 AdditionalContainers []*api.AdditionalContainer Platform platform.Platform }
func (*ContainerInstance) Run ¶ added in v0.3.0
func (inst *ContainerInstance) Run(ctx context.Context, config *RunConfig) (err error)
func (*ContainerInstance) WorkingDirectory ¶ added in v0.16.0
func (inst *ContainerInstance) WorkingDirectory(projectDir string, dirtyMode bool) string
type Instance ¶
type PersistentWorkerInstance ¶ added in v0.16.0
type PersistentWorkerInstance struct {
// contains filtered or unexported fields
}
func NewPersistentWorkerInstance ¶ added in v0.16.0
func NewPersistentWorkerInstance() (*PersistentWorkerInstance, error)
func (*PersistentWorkerInstance) Run ¶ added in v0.16.0
func (pwi *PersistentWorkerInstance) Run(ctx context.Context, config *RunConfig) (err error)
func (*PersistentWorkerInstance) WorkingDirectory ¶ added in v0.16.0
func (pwi *PersistentWorkerInstance) WorkingDirectory(projectDir string, dirtyMode bool) string
type PipeInstance ¶ added in v0.3.0
func (*PipeInstance) Run ¶ added in v0.3.0
func (pi *PipeInstance) Run(ctx context.Context, config *RunConfig) (err error)
func (*PipeInstance) WorkingDirectory ¶ added in v0.16.0
func (pi *PipeInstance) WorkingDirectory(projectDir string, dirtyMode bool) string
type PrebuiltInstance ¶ added in v0.3.0
func (*PrebuiltInstance) Run ¶ added in v0.3.0
func (prebuilt *PrebuiltInstance) Run(ctx context.Context, config *RunConfig) error
func (*PrebuiltInstance) WorkingDirectory ¶ added in v0.16.0
func (prebuilt *PrebuiltInstance) WorkingDirectory(projectDir string, dirtyMode bool) string
type RunConfig ¶
type RunConfig struct { ContainerBackend containerbackend.ContainerBackend ProjectDir string ContainerEndpoint string DirectEndpoint string ServerSecret, ClientSecret string TaskID int64 Logger *echelon.Logger DirtyMode bool ContainerOptions options.ContainerOptions // contains filtered or unexported fields }
func (*RunConfig) GetAgentVersion ¶ added in v0.18.0
func (*RunConfig) SetAgentVersion ¶ added in v0.18.0
type Volume ¶ added in v0.3.0
type Volume struct {
// contains filtered or unexported fields
}
func CreateWorkingVolume ¶ added in v0.3.0
func CreateWorkingVolume( ctx context.Context, backend containerbackend.ContainerBackend, containerOptions options.ContainerOptions, name string, projectDir string, dontPopulate bool, agentVersion string, platform platform.Platform, ) (vol *Volume, err error)
CreateWorkingVolume returns name of the working volume created according to the specification in arguments.
func CreateWorkingVolumeFromConfig ¶ added in v0.3.0
func CreateWorkingVolumeFromConfig( ctx context.Context, config *RunConfig, platform platform.Platform, ) (*Volume, error)
CreateWorkingVolumeFromConfig returns name of the working volume created according to the specification in config.
func (*Volume) Close ¶ added in v0.3.0
func (volume *Volume) Close(backend containerbackend.ContainerBackend) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.