Documentation
¶
Index ¶
Constants ¶
const MARATHON_CONSUL_LABEL = "consul"
Only Marathon apps with this label will be registered in Consul
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
Labels map[string]string `json:"labels"`
HealthChecks []HealthCheck `json:"healthChecks"`
ID AppId `json:"id"`
Tasks []Task `json:"tasks"`
}
func (*App) ConsulServiceName ¶ added in v0.3.2
func (*App) IsConsulApp ¶ added in v0.3.1
type AppId ¶ added in v0.3.2
type AppId string
Marathon Application Id (aka PathId) Usually in the form of /rootGroup/subGroup/subSubGroup/name allowed characters: lowercase letters, digits, hyphens, slash
func (AppId) ConsulServiceName ¶ added in v0.3.2
type AppWrapper ¶
type AppWrapper struct {
App App `json:"app"`
}
type AppsResponse ¶
type AppsResponse struct {
Apps []*App `json:"apps"`
}
type HealthCheck ¶
type HealthCheck struct {
Path string `json:"path"`
PortIndex int `json:"portIndex"`
Protocol string `json:"protocol"`
GracePeriodSeconds int `json:"gracePeriodSeconds"`
IntervalSeconds int `json:"intervalSeconds"`
TimeoutSeconds int `json:"timeoutSeconds"`
MaxConsecutiveFailures int `json:"maxConsecutiveFailures"`
Command struct {
Value string `json:"value`
}
}
type HealthCheckResult ¶ added in v0.3.2
type HealthCheckResult struct {
Alive bool `json:"alive"`
}
type Task ¶ added in v0.3.2
type Task struct {
ID TaskId `json:"id"`
TaskStatus string `json:"taskStatus"`
AppID AppId `json:"appId"`
Host string `json:"host"`
Ports []int `json:"ports"`
HealthCheckResults []HealthCheckResult `json:"healthCheckResults"`
}
func ParseTasks ¶ added in v0.3.2
type TaskId ¶ added in v0.3.2
type TaskId string
Marathon Task Id Usually in the form of AppId.uuid with '/' replaced with '_'
type TasksResponse ¶ added in v0.3.2
type TasksResponse struct {
Tasks []*Task `json:"tasks"`
}