Documentation
¶
Index ¶
- func KvpToEnv(kvp []KeyValuePair) []string
- type DockerComputeManager
- type DockerComputeManagerConfig
- type DockerComputeProvider
- func (dcp *DockerComputeProvider) JobLog(submittedJobId string, token *string) (JobLogOutput, error)
- func (dcp *DockerComputeProvider) RegisterPlugin(plugin *Plugin) (PluginRegistrationOutput, error)
- func (dcp *DockerComputeProvider) Status(jobQueue string, query JobsSummaryQuery) error
- func (dcp *DockerComputeProvider) SubmitJob(job *Job) error
- func (dcp *DockerComputeProvider) TerminateJobs(input TerminateJobInput) error
- func (dcp *DockerComputeProvider) UnregisterPlugin(nameAndRevision string) error
- type DockerComputeProviderConfig
- type DockerEvent
- type DockerJob
- type DockerJobRunner
- type DockerMonitorWriter
- type DockerRunMonitor
- type EnvironmentSecretManager
- type InMemoryJobQueue
- type InMemoryPluginRegistry
- type InMemorySecretsManager
- type JobDeps
- type JobQueue
- type JobStatus
- type MonitorFunction
- type PluginRegistry
- type SecretsManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DockerComputeManager ¶
type DockerComputeManager struct {
// contains filtered or unexported fields
}
func NewDockerComputeManager ¶
func NewDockerComputeManager(config DockerComputeManagerConfig) *DockerComputeManager
func (*DockerComputeManager) AddJob ¶
func (dcm *DockerComputeManager) AddJob(djob *DockerJob)
func (*DockerComputeManager) StartMonitor ¶
func (dcm *DockerComputeManager) StartMonitor(interval int, monitorFunc MonitorFunction)
func (*DockerComputeManager) TerminateJobs ¶
func (dcm *DockerComputeManager) TerminateJobs(input TerminateJobInput)
type DockerComputeManagerConfig ¶
type DockerComputeManagerConfig struct {
Concurrency int
}
type DockerComputeProvider ¶
type DockerComputeProvider struct {
// contains filtered or unexported fields
}
func NewDockerComputeProvider ¶
func NewDockerComputeProvider(config DockerComputeProviderConfig) *DockerComputeProvider
NewDockerComputeProvider creates a new DockerComputeProvider based on the given configuration.
func (*DockerComputeProvider) JobLog ¶
func (dcp *DockerComputeProvider) JobLog(submittedJobId string, token *string) (JobLogOutput, error)
func (*DockerComputeProvider) RegisterPlugin ¶
func (dcp *DockerComputeProvider) RegisterPlugin(plugin *Plugin) (PluginRegistrationOutput, error)
RegisterPlugin registers a plugin with the DockerComputeProvider.
func (*DockerComputeProvider) Status ¶
func (dcp *DockerComputeProvider) Status(jobQueue string, query JobsSummaryQuery) error
Status retrieves and returns job summaries based on the query.
func (*DockerComputeProvider) SubmitJob ¶
func (dcp *DockerComputeProvider) SubmitJob(job *Job) error
SubmitJob submits a job for execution.
func (*DockerComputeProvider) TerminateJobs ¶
func (dcp *DockerComputeProvider) TerminateJobs(input TerminateJobInput) error
TerminateJobs terminates jobs based on the provided input.
func (*DockerComputeProvider) UnregisterPlugin ¶
func (dcp *DockerComputeProvider) UnregisterPlugin(nameAndRevision string) error
type DockerComputeProviderConfig ¶
type DockerComputeProviderConfig struct {
//number of concurrent containers to allow on the host
Concurrency int
//starts a monitor job which provides job summary counts similar to the AWS Batch dashboard.
//If the value provided is greater than 0, the monitor will start using the value as a monitoring interval in seconds
StartMonitor int
//optional monitor function. The default monitor will print the status counts to StdOut
MonitorFunction MonitorFunction
//optional in memory secrets manager if a secrets mock is necessary
SecretsManager SecretsManager
}
DockerComputeProviderConfig holds the configuration for DockerComputeProvider.
type DockerEvent ¶
type DockerJob ¶
type DockerJob struct {
Job *Job
Plugin *Plugin
Status JobStatus
Log string
SecretsManager SecretsManager
// contains filtered or unexported fields
}
type DockerJobRunner ¶
type DockerJobRunner struct {
// contains filtered or unexported fields
}
func NewRunner ¶
func NewRunner(job *DockerJob) (*DockerJobRunner, error)
func (*DockerJobRunner) Close ¶
func (dr *DockerJobRunner) Close()
func (*DockerJobRunner) Run ¶
func (dr *DockerJobRunner) Run() error
func (*DockerJobRunner) Terminate ¶
func (dr *DockerJobRunner) Terminate() error
type DockerMonitorWriter ¶
type DockerMonitorWriter struct {
// contains filtered or unexported fields
}
Custom writer that formats output with job ID
type DockerRunMonitor ¶
type DockerRunMonitor struct {
// contains filtered or unexported fields
}
func NewDockerRunMonitor ¶
func NewDockerRunMonitor(dr *DockerJobRunner, containerId string) *DockerRunMonitor
func (*DockerRunMonitor) Wait ¶
func (drm *DockerRunMonitor) Wait()
type EnvironmentSecretManager ¶
type EnvironmentSecretManager struct {
// contains filtered or unexported fields
}
func (*EnvironmentSecretManager) AddSecret ¶
func (sm *EnvironmentSecretManager) AddSecret(key string, val string)
func (*EnvironmentSecretManager) GetSecret ¶
func (sm *EnvironmentSecretManager) GetSecret(key string) string
type InMemoryJobQueue ¶
func (*InMemoryJobQueue) Add ¶
func (jq *InMemoryJobQueue) Add(job *DockerJob)
func (*InMemoryJobQueue) GetNextRunnable ¶
func (jq *InMemoryJobQueue) GetNextRunnable() *DockerJob
func (*InMemoryJobQueue) Jobs ¶
func (jq *InMemoryJobQueue) Jobs(statuses ...JobStatus) []*DockerJob
func (*InMemoryJobQueue) UpdateJobs ¶
func (jq *InMemoryJobQueue) UpdateJobs() []uuid.UUID
type InMemoryPluginRegistry ¶
type InMemoryPluginRegistry struct {
// contains filtered or unexported fields
}
func (*InMemoryPluginRegistry) Deregister ¶
func (pr *InMemoryPluginRegistry) Deregister(name string) error
func (*InMemoryPluginRegistry) Get ¶
func (pr *InMemoryPluginRegistry) Get(name string) (*Plugin, error)
func (*InMemoryPluginRegistry) Register ¶
func (pr *InMemoryPluginRegistry) Register(plugin *Plugin) error
type InMemorySecretsManager ¶
type InMemorySecretsManager struct {
// contains filtered or unexported fields
}
func (*InMemorySecretsManager) AddSecret ¶
func (sm *InMemorySecretsManager) AddSecret(key string, val string)
func (*InMemorySecretsManager) GetSecret ¶
func (sm *InMemorySecretsManager) GetSecret(key string) string
type JobQueue ¶
type JobQueue interface {
Add(job *DockerJob)
//Gets the next runable job and sets the status to Starting
GetNextRunnable() *DockerJob
//Gets all jobs matching the set of statuses
//Calling with no status argument will return all jobs
Jobs(statuses ...JobStatus) []*DockerJob
//Get a job by ID
GetJob(jobId uuid.UUID) *DockerJob
UpdateJobs() []uuid.UUID
}
func NewInMemoryJobQueue ¶
func NewInMemoryJobQueue() JobQueue
type MonitorFunction ¶
type PluginRegistry ¶
type PluginRegistry interface {
Register(plugin *Plugin) error
Deregister(name string) error
Get(name string) (*Plugin, error)
}
func NewInMemoryPluginRegistry ¶
func NewInMemoryPluginRegistry() PluginRegistry
type SecretsManager ¶
func NewEnvironmentSecretsManager ¶
func NewEnvironmentSecretsManager() SecretsManager
func NewInMemorySecretsManager ¶
func NewInMemorySecretsManager(key string) SecretsManager
create a new in memory secret manager key is reserved for adding an encryption key should it be added later
Click to show internal directories.
Click to hide internal directories.