Versions in this module Expand all Collapse all v0 v0.20.0 Jun 24, 2015 Changes in this version + const Bound + const DefaultContainerCpus + const DefaultContainerMem + const Deleted + const Launched + const PodPath + const PortMappingLabelKey + func InstallDebugHandlers(reg Registry, mux *http.ServeMux) + func MakePodKey(ctx api.Context, id string) (string, error) + func ParsePodStatusResult(taskStatus *mesos.TaskStatus) (result api.PodStatusResult, err error) + type DuplicateHostPortError struct + func (err *DuplicateHostPortError) Error() string + type FlagType string + type HostPortMapper interface + Generate func(t *T, offer *mesos.Offer) ([]HostPortMapping, error) + type HostPortMapping struct + ContainerIdx int + OfferPort uint64 + PortIdx int + type HostPortMappingType string + const HostPortMappingFixed + const HostPortMappingWildcard + func MappingTypeForPod(pod *api.Pod) HostPortMappingType + func (self HostPortMappingType) Generate(t *T, offer *mesos.Offer) ([]HostPortMapping, error) + type PortAllocationError struct + PodId string + Ports []uint64 + func (err *PortAllocationError) Error() string + type Registry interface + ForPod func(podID string) (task *T, currentState StateType) + Get func(taskId string) (task *T, currentState StateType) + List func(filter func(*T) bool) []*T + Register func(*T, error) (*T, error) + Unregister func(*T) + Update func(task *T) error + UpdateStatus func(status *mesos.TaskStatus) (*T, StateType) + func NewInMemoryRegistry() Registry + type Spec struct + CPU float64 + Data []byte + Memory float64 + PortMap []HostPortMapping + Ports []uint64 + SlaveID string + type StateType int + const StateFinished + const StatePending + const StateRunning + const StateUnknown + type T struct + CreateTime time.Time + Flags map[FlagType]struct{} + ID string + Offer offers.Perishable + Pod api.Pod + Spec Spec + State StateType + UpdatedTime time.Time + func New(ctx api.Context, id string, pod api.Pod, executor *mesos.ExecutorInfo) (*T, error) + func RecoverFrom(pod api.Pod) (*T, bool, error) + func (t *T) AcceptOffer(offer *mesos.Offer) bool + func (t *T) BuildTaskInfo() *mesos.TaskInfo + func (t *T) Clone() *T + func (t *T) FillFromDetails(details *mesos.Offer) error + func (t *T) GetOfferId() string + func (t *T) Has(f FlagType) (exists bool) + func (t *T) HasAcceptedOffer() bool + func (t *T) Reset() + func (t *T) SaveRecoveryInfo(dict map[string]string) + func (t *T) Set(f FlagType)