controller

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2020 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func New

func New(client api.SchedulerClient, executor Executor, concurrency int) *Controller

func (*Controller) ApproveJob

func (c *Controller) ApproveJob(project string, workspace string) error

func (*Controller) CancelJob

func (c *Controller) CancelJob(project string, workspace string) error

func (*Controller) Start

func (c *Controller) Start() error

func (*Controller) Stop

func (c *Controller) Stop() error

func (*Controller) SubmitJob

func (c *Controller) SubmitJob(project string, workspace string) error

type Executor

type Executor interface {
	Plan(project string, workspace string) (Process, error)
	Apply(project string, workspace string) (Process, error)
}

func NewEcsExecutor

func NewEcsExecutor(config *ExecutorEcsConfig) Executor

func NewLocalExecutor

func NewLocalExecutor(path string) Executor

type ExecutorEcs

type ExecutorEcs struct {
	// contains filtered or unexported fields
}

func (*ExecutorEcs) Apply

func (r *ExecutorEcs) Apply(project string, workspace string) (Process, error)

func (*ExecutorEcs) Plan

func (r *ExecutorEcs) Plan(project string, workspace string) (Process, error)

type ExecutorEcsConfig

type ExecutorEcsConfig struct {
	Cluster          string
	TaskDefinition   string
	ContainerName    string
	CapacityProvider string
	Subnets          []string
	SecurityGroups   []string
	AssignPublicIp   bool
}

type ExecutorLocal

type ExecutorLocal struct {
	// contains filtered or unexported fields
}

func (*ExecutorLocal) Apply

func (r *ExecutorLocal) Apply(project string, workspace string) (Process, error)

func (*ExecutorLocal) Plan

func (r *ExecutorLocal) Plan(project string, workspace string) (Process, error)

type ExecutorMock

type ExecutorMock struct {
	mock.Mock
}

func NewExecutorMock

func NewExecutorMock() *ExecutorMock

func (*ExecutorMock) Apply

func (m *ExecutorMock) Apply(project string, workspace string) (Process, error)

func (*ExecutorMock) Cancel

func (m *ExecutorMock) Cancel(project string, workspace string) error

func (*ExecutorMock) Plan

func (m *ExecutorMock) Plan(project string, workspace string) (Process, error)

type Process

type Process interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL