marathon

package
v0.2.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Id              string
	EscapedId       string
	HealthCheckPath string
	HealthChecks    []HealthCheck
	Tasks           []Task
	ServicePort     int
	ServicePorts    []int
	Env             map[string]string
	Labels          map[string]string
}

An app may have multiple processes

type AppList added in v0.2.0

type AppList []App

func FetchApps

func FetchApps(maraconf configuration.Marathon, conf *configuration.Configuration) (AppList, error)

Apps returns a struct that describes Marathon current app and their sub tasks information.

Parameters:

endpoint: Marathon HTTP endpoint, e.g. http://localhost:8080

func (AppList) Len added in v0.2.0

func (slice AppList) Len() int

func (AppList) Less added in v0.2.0

func (slice AppList) Less(i, j int) bool

func (AppList) Swap added in v0.2.0

func (slice AppList) Swap(i, j int)

type HealthCheck added in v0.2.13

type HealthCheck struct {
	// One of TCP, HTTP or COMMAND
	Protocol string
	// The path (if Protocol is HTTP)
	Path string
	// The position of the port targeted in the ports array
	PortIndex int
}

A health check on the application

type Task

type Task struct {
	Host  string
	Port  int
	Ports []int
}

Describes an app process running

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL