Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInsufficientCapacity is the new error when capacity is insufficient ErrInsufficientCapacity = errors.New("insufficient capacity") )
var ErrNoDeployments = errors.New("no deployments")
ErrNoDeployments indicates no deployments exist
var ErrNotRunning = errors.New("not running")
ErrNotRunning is the error when service is not running
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v0.0.8
type Client interface { ReadClient Deploy(context.Context, mtypes.LeaseID, *manifest.Group) error TeardownLease(context.Context, mtypes.LeaseID) error Deployments(context.Context) ([]Deployment, error) Inventory(context.Context) ([]Node, error) }
Client interface lease and deployment methods
type Cluster ¶
type Cluster interface { Reserve(mtypes.OrderID, atypes.ResourceGroup) (Reservation, error) Unreserve(mtypes.OrderID, atypes.ResourceGroup) error }
Cluster is the interface that wraps Reserve and Unreserve methods
type Deployment ¶ added in v0.0.9
Deployment interface defined with LeaseID and ManifestGroup methods
type InventoryStatus ¶ added in v0.6.0
type InventoryStatus struct { Active []atypes.Unit `json:"active"` Pending []atypes.Unit `json:"pending"` Available []atypes.Unit `json:"available"` }
InventoryStatus stores active, pending and available units
type LeaseStatus ¶ added in v0.6.0
type LeaseStatus struct {
Services []*ServiceStatus `json:"services"`
}
LeaseStatus includes list of services with their status
type ReadClient ¶ added in v0.7.3
type Reservation ¶
type Reservation interface { OrderID() mtypes.OrderID Resources() atypes.ResourceGroup }
Reservation interface implements orders and resources
type Service ¶
type Service interface { StatusClient Cluster Close() error Ready() <-chan struct{} Done() <-chan struct{} }
Service manage compute cluster for the provider. Will eventually integrate with kubernetes, etc...
type ServiceLog ¶ added in v0.2.2
type ServiceLog struct { Name string Stream io.ReadCloser Scanner *bufio.Scanner }
ServiceLog stores name, stream and scanner
func NewServiceLog ¶ added in v0.2.2
func NewServiceLog(name string, stream io.ReadCloser) *ServiceLog
NewServiceLog creates and returns a service log with provided details
type ServiceStatus ¶ added in v0.6.0
type ServiceStatus struct { Name string `json:"name"` Available int32 `json:"available"` Total int32 `json:"total"` URIs []string `json:"uris"` ObservedGeneration int64 `json:"observed-generation"` Replicas int32 `json:"replicas"` UpdatedReplicas int32 `json:"updated-replicas"` ReadyReplicas int32 `json:"ready-replicas"` AvailableReplicas int32 `json:"available-replicas"` }
ServiceStatus stores the current status of service
type Status ¶ added in v0.6.0
type Status struct { Leases uint32 `json:"leases"` Inventory InventoryStatus `json:"inventory"` }
Status stores current leases and inventory statuses