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

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