Documentation ¶
Index ¶
Constants ¶
View Source
const MarathonConsulLabel = "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"` PortDefinitions []PortDefinition `json:"portDefinitions"` }
func (*App) IsConsulApp ¶ added in v0.3.1
func (*App) RegistrationIntents ¶ added in v1.0.0
func (app *App) RegistrationIntents(task *Task, nameSeparator string) []*RegistrationIntent
func (*App) RegistrationIntentsNumber ¶ added in v1.0.0
type AppID ¶ added in v1.0.0
type AppID string
Marathon Application Id (aka PathId) Usually in the form of /rootGroup/subGroup/subSubGroup/name allowed characters: lowercase letters, digits, hyphens, slash
type HealthCheck ¶
type HealthCheck struct { Path string `json:"path"` PortIndex int `json:"portIndex"` Port int `json:"port"` 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 PortDefinition ¶ added in v1.0.0
type RegistrationIntent ¶ added in v1.0.0
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 v1.0.0
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"`
}
Click to show internal directories.
Click to hide internal directories.