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 { Deploy(context.Context, mtypes.LeaseID, *manifest.Group) error TeardownLease(context.Context, mtypes.LeaseID) error Deployments(context.Context) ([]Deployment, error) LeaseStatus(context.Context, mtypes.LeaseID) (*LeaseStatus, error) ServiceStatus(context.Context, mtypes.LeaseID, string) (*ServiceStatus, error) ServiceLogs(context.Context, mtypes.LeaseID, int64, bool) ([]*ServiceLog, 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
InventoryStatus stores active, pending and available units
type LeaseStatus ¶ added in v0.6.0
type LeaseStatus struct {
Services []*ServiceStatus
}
LeaseStatus includes list of services with their status
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 Available int32 Total int32 URIs []string ObservedGeneration int64 Replicas int32 UpdatedReplicas int32 ReadyReplicas int32 AvailableReplicas int32 }
ServiceStatus stores the current status of service
type Status ¶ added in v0.6.0
type Status struct { Leases uint32 Inventory InventoryStatus }
Status stores current leases and inventory statuses