Documentation
¶
Index ¶
Constants ¶
const ( // DockerIPLabel is the key of the Label which holds the Docker containerizer IP value. DockerIPLabel = "Docker.NetworkSettings.IPAddress" // MesosIPLabel is the key of the label which holds the Mesos containerizer IP value. MesosIPLabel = "MesosContainerizer.NetworkSettings.IPAddress" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerStatus ¶
type ContainerStatus struct {
NetworkInfos []NetworkInfo `json:"network_infos,omitempty"`
}
ContainerStatus holds container metadata as defined in the /state.json Mesos HTTP endpoint.
type DiscoveryInfo ¶
type DiscoveryInfo struct {
Visibilty string `json:"visibility"`
Version string `json:"version,omitempty"`
Name string `json:"name,omitempty"`
Location string `json:"location,omitempty"`
Environment string `json:"environment,omitempty"`
Labels struct {
Labels []Label `json:"labels"`
} `json:"labels"`
Ports struct {
DiscoveryPorts []DiscoveryPort `json:"ports"`
} `json:"ports"`
}
DiscoveryInfo holds the discovery meta data for a task defined in the /state.json Mesos HTTP endpoint.
type DiscoveryPort ¶
type DiscoveryPort struct {
Protocol string `json:"protocol"`
Number int `json:"number"`
Name string `json:"name"`
}
DiscoveryPort holds a port for a task defined in the /state.json Mesos HTTP endpoint.
type Framework ¶
type Framework struct {
Tasks []Task `json:"tasks"`
PID PID `json:"pid"`
Name string `json:"name"`
Hostname string `json:"hostname"`
}
Framework holds a framework as defined in the /state.json Mesos HTTP endpoint.
type IPAddress ¶ added in v0.3.1
type IPAddress struct {
IPAddress string `json:"ip_address,omitempty"`
}
IPAddress holds a single IP address configured on an interface, as defined in the /state.json Mesos HTTP endpoint.
type NetworkInfo ¶
type NetworkInfo struct {
IPAddresses []IPAddress `json:"ip_addresses,omitempty"`
// back-compat with 0.25 IPAddress format
IPAddress string `json:"ip_address,omitempty"`
}
NetworkInfo holds the network configuration for a single interface as defined in the /state.json Mesos HTTP endpoint.
type PID ¶
PID holds a Mesos PID and implements the json.Unmarshaler interface.
func (*PID) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface for PIDs.
type Resources ¶
type Resources struct {
PortRanges string `json:"ports"`
}
Resources holds resources as defined in the /state.json Mesos HTTP endpoint.
type State ¶
type State struct {
Frameworks []Framework `json:"frameworks"`
Slaves []Slave `json:"slaves"`
Leader string `json:"leader"`
}
State holds the state defined in the /state.json Mesos HTTP endpoint.
type Status ¶
type Status struct {
Timestamp float64 `json:"timestamp"`
State string `json:"state"`
Labels []Label `json:"labels,omitempty"`
ContainerStatus ContainerStatus `json:"container_status,omitempty"`
}
Status holds a task status as defined in the /state.json Mesos HTTP endpoint.
type Task ¶
type Task struct {
FrameworkID string `json:"framework_id"`
ID string `json:"id"`
Name string `json:"name"`
SlaveID string `json:"slave_id"`
State string `json:"state"`
Statuses []Status `json:"statuses"`
Labels []Label `json:"labels"`
Resources `json:"resources"`
DiscoveryInfo DiscoveryInfo `json:"discovery"`
SlaveIP string `json:"-"`
}
Task holds a task as defined in the /state.json Mesos HTTP endpoint.
func (*Task) HasDiscoveryInfo ¶
HasDiscoveryInfo return whether the DiscoveryInfo was provided in the state.json