Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppsToTargetGroups ¶ added in v1.4.0
func AppsToTargetGroups(apps *AppList) map[string]*config.TargetGroup
AppsToTargetGroups takes an array of Marathon apps and converts them into target groups.
func RandomAppsURL ¶ added in v1.4.0
RandomAppsURL randomly selects a server from an array and creates an URL pointing to the app list.
Types ¶
type App ¶ added in v1.4.0
type App struct { ID string `json:"id"` Tasks []Task `json:"tasks"` RunningTasks int `json:"tasksRunning"` Labels map[string]string `json:"labels"` Container Container `json:"container"` PortDefinitions []PortDefinitions `json:"portDefinitions"` }
App describes a service running on Marathon.
type AppList ¶ added in v1.4.0
type AppList struct {
Apps []App `json:"apps"`
}
AppList is a list of Marathon apps.
type AppListClient ¶ added in v1.4.0
AppListClient defines a function that can be used to get an application list from marathon.
type Container ¶ added in v1.4.0
type Container struct {
Docker DockerContainer `json:"docker"`
}
Container describes the runtime an app in running in.
type Discovery ¶
type Discovery struct {
// contains filtered or unexported fields
}
Discovery provides service discovery based on a Marathon instance.
func NewDiscovery ¶
NewDiscovery returns a new Marathon Discovery.
type DockerContainer ¶ added in v1.4.0
type DockerContainer struct { Image string `json:"image"` PortMappings []PortMappings `json:"portMappings"` }
DockerContainer describes a container which uses the docker runtime.
type PortDefinitions ¶ added in v1.6.0
PortDefinitions describes which load balancer port you should access to access the service.
type PortMappings ¶ added in v1.6.0
PortMappings describes in which port the process are binding inside the docker container.