cluster

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInsufficientCapacity = errors.New("insufficient capacity")
)
View Source
var ErrNoDeployments = errors.New("no deployments")
View Source
var ErrNotRunning = errors.New("not running")

Functions

This section is empty.

Types

type Client added in v0.0.8

type Client interface {
	Deploy(types.LeaseID, *types.ManifestGroup) error
	TeardownLease(types.LeaseID) error
	Deployments() ([]Deployment, error)
	LeaseStatus(types.LeaseID) (*types.LeaseStatusResponse, error)
	ServiceStatus(types.LeaseID, string) (*types.ServiceStatusResponse, error)
	ServiceLogs(context.Context, types.LeaseID, int64, bool) ([]*ServiceLog, error)
	Inventory() ([]Node, error)
}

func NullClient added in v0.0.8

func NullClient() Client

type Cluster

type Cluster interface {
	Reserve(types.OrderID, *types.DeploymentGroup) (Reservation, error)
	Unreserve(types.OrderID, types.ResourceList) error
}

type Deployment added in v0.0.9

type Deployment interface {
	LeaseID() types.LeaseID
	ManifestGroup() *types.ManifestGroup
}

type Node added in v0.2.4

type Node interface {
	ID() string
	Available() types.ResourceUnit
}

func NewNode added in v0.2.4

func NewNode(id string, available types.ResourceUnit) Node

type Reservation

type Reservation interface {
	OrderID() types.OrderID
	Resources() types.ResourceList
}

type Service

type Service interface {
	StatusClient
	Cluster
	Close() error
	Ready() <-chan struct{}
	Done() <-chan struct{}
}

Manage compute cluster for the provider. Will eventually integrate with kubernetes, etc...

func NewService

func NewService(ctx context.Context, session session.Session, bus event.Bus, client Client) (Service, error)

type ServiceLog added in v0.2.2

type ServiceLog struct {
	Name    string
	Stream  io.ReadCloser
	Scanner *bufio.Scanner
}

func NewServiceLog added in v0.2.2

func NewServiceLog(name string, stream io.ReadCloser) *ServiceLog

type StatusClient added in v0.3.4

type StatusClient interface {
	Status(context.Context) (*types.ProviderClusterStatus, error)
}

Directories

Path Synopsis
mocks
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.

Jump to

Keyboard shortcuts

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