Documentation ¶
Overview ¶
Types package includes all the structures shared between the caravela's server/daemon and its clients.
Index ¶
Constants ¶
View Source
const ( SpreadGroupPolicyStr = "spread" CoLocationGroupPolicyStr = "co-location" )
View Source
const ( LowCPUClassStr = "low" HighCPUClassStr = "high" )
Variables ¶
View Source
var ( RequestIDKey = requestCtxKey("ID") NodeGUIDKey = requestCtxKey("GUID") PartitionsStateKey = requestCtxKey("PartitionsState") )
Functions ¶
Types ¶
type AvailableOffer ¶
type ContainerConfig ¶
type ContainerConfig struct { Name string `json:"N"` ImageKey string `json:"IK"` Args []string `json:"A"` PortMappings []PortMapping `json:"PM"` Resources Resources `json:"FR"` GroupPolicy GroupPolicy `json:"GP"` }
type ContainerStatus ¶
type ContainerStatus struct { ContainerConfig `json:"CC"` SupplierIP string `json:"SIp"` ContainerID string `json:"CId"` Status string `json:"S"` }
type GroupPolicy ¶
type GroupPolicy uint
const ( SpreadGroupPolicy GroupPolicy = iota CoLocationGroupPolicy )
func (GroupPolicy) String ¶
func (gp GroupPolicy) String() string
func (*GroupPolicy) ValueOf ¶
func (gp *GroupPolicy) ValueOf(arg string) error
type PartitionState ¶
func SysPartitionsState ¶
func SysPartitionsState(ctx context.Context) []PartitionState
SysPartitionsState retrieves the partitions state from a context.
type PortMapping ¶
Click to show internal directories.
Click to hide internal directories.