Documentation
¶
Overview ¶
Package scheduler provides the core interface that Empire uses when interacting with a cluster of machines to run tasks.
Index ¶
- type App
- type AttachedRunner
- type Exposure
- type FakeScheduler
- func (m *FakeScheduler) Instances(ctx context.Context, appID string) ([]*Instance, error)
- func (m *FakeScheduler) Remove(ctx context.Context, appID string) error
- func (m *FakeScheduler) Run(ctx context.Context, app *App, p *Process, in io.Reader, out io.Writer) error
- func (m *FakeScheduler) Scale(ctx context.Context, app string, ptype string, instances uint) error
- func (m *FakeScheduler) Stop(ctx context.Context, instanceID string) error
- func (m *FakeScheduler) Submit(ctx context.Context, app *App) error
- type Instance
- type PortMap
- type Process
- type Runner
- type Scaler
- type Scheduler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttachedRunner ¶
AttachedRunner wraps a Manager to run attached processes using docker directly to get access to stdin and stdout.
type FakeScheduler ¶
type FakeScheduler struct {
// contains filtered or unexported fields
}
func NewFakeScheduler ¶
func NewFakeScheduler() *FakeScheduler
func (*FakeScheduler) Remove ¶
func (m *FakeScheduler) Remove(ctx context.Context, appID string) error
type Instance ¶
type Instance struct { Process *Process // The instance ID. ID string // The State that this Instance is in. State string // The time that this instance was last updated. UpdatedAt time.Time }
Instance represents an Instance of a Process.
type Process ¶
type Process struct { // The type of process. Type string // The Image to run. Image image.Image // The Command to run. Command string // Environment variables to set. Env map[string]string // Labels to set on the container. Labels map[string]string // Mapping of host -> container port mappings. Ports []PortMap // Exposure is the level of exposure for this process. Exposure Exposure // Instances is the desired instances of this service to run. Instances uint // The amount of RAM to allocate to this process in bytes. MemoryLimit uint // the --cpu-shares flag for docker. CPUShares uint // A load balancer to attach to the process. LoadBalancer string // An SSL Cert associated with this process. SSLCert string }
type Scheduler ¶
type Scheduler interface { Scaler Runner // Submit submits an app, creating it or updating it as necessary. Submit(context.Context, *App) error // Remove removes the App. Remove(ctx context.Context, app string) error // Instance lists the instances of a Process for an app. Instances(ctx context.Context, app string) ([]*Instance, error) // Stop stops an instance. The scheduler will automatically start a new // instance. Stop(ctx context.Context, instanceID string) error }
Scheduler is an interface for interfacing with Services.
Directories
¶
Path | Synopsis |
---|---|
Package cloudformation implements the Scheduler interface for ECS by using CloudFormation to provision and update resources.
|
Package cloudformation implements the Scheduler interface for ECS by using CloudFormation to provision and update resources. |
Package docker implements the Scheduler interface backed by the Docker API.
|
Package docker implements the Scheduler interface backed by the Docker API. |
Pacakge ecs provides an implementation of the Scheduler interface that uses Amazon EC2 Container Service.
|
Pacakge ecs provides an implementation of the Scheduler interface that uses Amazon EC2 Container Service. |
Package kubernetes implements the Scheduler interface backed by Kubernetes.
|
Package kubernetes implements the Scheduler interface backed by Kubernetes. |
Click to show internal directories.
Click to hide internal directories.