Documentation
¶
Overview ¶
Package docker implements the Scheduler interface backed by the Docker API.
Index ¶
- Constants
- type AttachedScheduler
- type Scheduler
- func (s *Scheduler) Instances(ctx context.Context, app string) ([]*scheduler.Instance, error)
- func (s *Scheduler) InstancesFromAttachedRuns(ctx context.Context, app string) ([]*scheduler.Instance, error)
- func (s *Scheduler) Run(ctx context.Context, app *scheduler.App, p *scheduler.Process, in io.Reader, ...) error
- func (s *Scheduler) Stop(ctx context.Context, containerID string) error
Constants ¶
const ( Attached = "attached" Detached = "detached" )
Values for `runLabel`.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttachedScheduler ¶
type AttachedScheduler struct { // If set, attached run instances will be merged in with instances // returned from the wrapped scheduler. This is currently an // experimental feature, since it requires that multiple Empire // processes interact with a single Docker daemon. ShowAttached bool scheduler.Scheduler // contains filtered or unexported fields }
AttachedScheduler wraps a Scheduler to run attached processes using the Docker scheduler.
func RunAttachedWithDocker ¶
func RunAttachedWithDocker(s scheduler.Scheduler, client *dockerutil.Client) *AttachedScheduler
RunAttachedWithDocker wraps a Scheduler to run attached Run's using a Docker client.
func (*AttachedScheduler) Instances ¶
func (s *AttachedScheduler) Instances(ctx context.Context, app string) ([]*scheduler.Instance, error)
Instances returns a combination of instances from the wrapped scheduler, as well as instances from attached runs.
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler provides an implementation of the scheduler.Scheduler interface backed by Docker.
func NewScheduler ¶
func NewScheduler(client *dockerutil.Client) *Scheduler
NewScheduler returns a new Scheduler instance that uses the given client to interact with Docker.
func (*Scheduler) InstancesFromAttachedRuns ¶
func (s *Scheduler) InstancesFromAttachedRuns(ctx context.Context, app string) ([]*scheduler.Instance, error)
InstancesFromAttachedRuns returns Instances that were started from attached runs.