Documentation
¶
Index ¶
- type App
- type AppFilterOptions
- type AppInfoEvent
- type Container
- type Docker
- type FrameworkInfo
- type HealthCheck
- type JanitorAcceptor
- type KillPolicy
- type Parameter
- type PortMapping
- type ProceedUpdateParam
- type ResolverAcceptor
- type ScaleDownParam
- type ScaleUpParam
- type ServiceDiscovery
- type Stats
- type Task
- type TaskHistory
- type TaskInfoEvent
- type TaskPortMapping
- type UpdatePolicy
- type UpdateWeightParam
- type UpdateWeightsParam
- type Version
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { ID string `json:"id,omitempty"` Name string `json:"name"` Instances int `json:"instances"` UpdatedInstances int `json:"updatedInstances"` RunningInstances int `json:"runningInstances"` RunAs string `json:"runAs"` Priority int `json:"priority"` ClusterID string `json:"clusterID,omitempty"` Status string `json:"status,omitempty"` Created time.Time `json:"created,omitempty"` Updated time.Time `json:"updated,omitempty"` Mode string `json:"mode"` State string `json:"state,omitempty"` // use task for compatability now, should be slot here Tasks []*Task `json:"tasks,omitempty"` CurrentVersion *Version `json:"currentVersion"` // use when app updated, ProposedVersion can either be commit or revert ProposedVersion *Version `json:"proposedVersion,omitempty"` Versions []string `json:"versions,omitempty"` IP []string `json:"ip,omitempty"` // current version related info Labels map[string]string `json:"labels,omitempty"` Env map[string]string `json:"env,omitempty"` Constraints string `json:"constraints,omitempty"` URIs []string `json:"uris,omitempty"` }
type AppFilterOptions ¶ added in v0.1.3
type AppInfoEvent ¶ added in v0.1.3
type Docker ¶
type Docker struct { ForcePullImage bool `json:"forcePullImage,omitempty"` Image string `json:"image"` Network string `json:"network,omitempty"` Parameters []*Parameter `json:"parameters,omitempty"` PortMappings []*PortMapping `json:"portMappings,omitempty"` Privileged bool `json:"privileged,omitempty"` }
type FrameworkInfo ¶ added in v0.1.7
type FrameworkInfo struct {
ID string
}
type HealthCheck ¶
type HealthCheck struct { ID string `json:"id,omitempty"` Address string `json:"address,omitempty"` TaskID string `json:"taskID,omitempty"` AppID string `json:"appID,omitempty"` Protocol string `json:"protocol,omitempty"` PortName string `json:"portName,omitempty"` Value string `json:"value,omitempty"` Path string `json:"path,omitempty"` ConsecutiveFailures uint32 `json:"consecutiveFailures,omitempty"` GracePeriodSeconds float64 `json:"gracePeriodSeconds,omitempty"` IntervalSeconds float64 `json:"intervalSeconds,omitempty"` TimeoutSeconds float64 `json:"timeoutSeconds,omitempty"` DelaySeconds float64 `json:"delaySeconds,omitempty"` }
type JanitorAcceptor ¶
type KillPolicy ¶
type KillPolicy struct {
Duration int64 `json:"duration,omitempty"`
}
type PortMapping ¶
type ProceedUpdateParam ¶
type ResolverAcceptor ¶
type ScaleDownParam ¶
type ScaleDownParam struct {
Instances int `json:"instances"`
}
type ScaleUpParam ¶
type ServiceDiscovery ¶ added in v0.1.3
type Stats ¶
type Stats struct { ClusterID string `json:"clusterID"` AppCount int `json:"appCount"` TaskCount int `json:"taskCount"` Created float64 `json:"created"` Master string `json:"master"` Slaves string `json:"slaves"` Attributes []map[string]interface{} `json:"attributes"` TotalCpu float64 `json:"totalCpu"` TotalMem float64 `json:"totalMem"` TotalDisk float64 `json:"totalDisk"` CpuTotalOffered float64 `json:"cpuTotalOffered"` MemTotalOffered float64 `json:"memTotalOffered"` DiskTotalOffered float64 `json:"diskTotalOffered"` CpuTotalUsed float64 `json:"cpuTotalUsed"` MemTotalUsed float64 `json:"memTotalUsed"` DiskTotalUsed float64 `json:"diskTotalUsed"` AppStats map[string]int `json:"appStats,omitempty"` }
type Task ¶
type Task struct { ID string `json:"id,omitempty"` AppID string `json:"appID"` SlotID string `json:"slotID"` VersionID string `json:"versionID"` AppVersion string `json:"appVersion"` Status string `json:"status,omitempty"` OfferID string `json:"offerID,omitempty"` AgentID string `json:"agentID,omitempty"` AgentHostname string `json:"agentHostname,omitempty"` CPU float64 `json:"cpu"` Mem float64 `json:"mem"` Disk float64 `json:"disk"` History []*TaskHistory `json:"history,omitempty"` IP string `json:"ip,omitempty"` Ports []uint64 `json:"ports,omitempty"` Created time.Time `json:"created,omitempty"` Image string `json:"image"` Healthy bool `json:"healthy"` ContainerId string `json:"containerId"` ContainerName string `json:"containerName"` Weight float64 `json:"weight"` }
use task for compatability now, should be slot here and together with task history
type TaskHistory ¶
type TaskHistory struct { ID string `json:"id"` AppID string `json:"appID"` VersionID string `json:"versionID"` AppVersion string `json:"appVersion"` OfferID string `json:"offerID"` AgentID string `json:"agentID"` AgentHostname string `json:"agentHostname"` CPU float64 `json:"cpu"` Mem float64 `json:"mem"` Disk float64 `json:"disk"` State string `json:"state,omitempty"` Reason string `json:"reason,omitempty"` Message string `json:"message,omitempty"` Stdout string `json:"stdout,omitempty"` Stderr string `json:"stderr,omitempty"` ArchivedAt time.Time `json:"archivedAt, omitempty"` ContainerId string `json:"containerId"` ContainerName string `json:"containerName"` Weight float64 `json:"weight,omitempty"` }
type TaskInfoEvent ¶ added in v0.1.3
type TaskInfoEvent struct { IP string `json:"ip"` TaskID string `json:"taskID"` AppID string `json:"appID"` AppVersion string `json:"appVersion"` VersionID string `json:"versionID"` Port uint32 `json:"port"` PortName string `json:"portName"` State string `json:"state"` Healthy bool `json:"healthy"` ClusterID string `json:"clusterID"` RunAs string `json:"runAs"` Mode string `json:"mode"` Weight float64 `json:"weight"` AppName string `json:"appName"` SlotIndex int `json:"slotIndex"` }
type TaskPortMapping ¶ added in v0.1.3
type UpdatePolicy ¶
type UpdateWeightParam ¶ added in v0.1.11
type UpdateWeightParam struct {
Weight float64 `json:"weight"`
}
type UpdateWeightsParam ¶ added in v0.1.11
type Version ¶
type Version struct { ID string `json:"id,omitempty"` AppName string `json:"appName,omitempty"` AppVersion string `json:"appVersion,omitempty"` Command string `json:"cmd,omitempty"` Args []string `json:"args,omitempty"` CPUs float64 `json:"cpus"` Mem float64 `json:"mem"` Disk float64 `json:"disk"` Instances int32 `json:"instances"` RunAs string `json:"runAs"` Priority int32 `json:"priority"` Container *Container `json:"container"` Labels map[string]string `json:"labels,omitempty"` HealthCheck *HealthCheck `json:"healthCheck,omitempty"` Env map[string]string `json:"env,omitempty"` KillPolicy *KillPolicy `json:"killPolicy,omitempty"` UpdatePolicy *UpdatePolicy `json:"updatPolicy,omitempty"` Constraints string `json:"constraints,omitempty"` URIs []string `json:"uris,omitempty"` IP []string `json:"ip,omitempty"` }
func (*Version) AddLabel ¶
AddLabel adds a label to the application
name: the name of the label value: value for this label
func (*Version) EmptyLabels ¶
EmptyLabels explicitly empties the labels -- use this if you need to empty the labels of an application that already has labels set (setting labels to nil will keep the current value)
Click to show internal directories.
Click to hide internal directories.