marathon

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2017 License: Apache-2.0 Imports: 7 Imported by: 32

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
	MesosDnsId          string
	EscapedId           string
	HealthCheckPath     string
	HealthCheckProtocol string
	HealthChecks        []HealthCheck
	ReadinessCheckPath  string
	Tasks               []Task
	ServicePort         int
	ServicePorts        []int
	Env                 map[string]string
	Labels              map[string]string
	SplitId             []string
	IpAddress           AppIpAddress `json:"ipAddress"`
}

An app may have multiple processes

type AppIpAddress added in v0.3.1

type AppIpAddress struct {
	Discovery Discovery `json:"discovery"`
}

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 Discovery added in v0.3.1

type Discovery struct {
	Ports []Port `json:"ports"`
}

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 HealthCheckResult added in v0.3.0

type HealthCheckResult struct {
	Alive bool
}

type Port added in v0.3.1

type Port struct {
	Number   int    `json:"number"`
	Name     string `json:"name"`
	Protocol string `json:"protocol"`
}

type Task

type Task struct {
	Id    string
	Host  string
	Port  int
	Ports []int
	Alive bool
	State string
	Ready bool
}

Describes an app process running

type TaskIpAddress added in v0.3.1

type TaskIpAddress struct {
	IpAddress string `json:"ipAddress"`
	Protocol  string `json:"protocol"`
}

Jump to

Keyboard shortcuts

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