marathon

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2016 License: Apache-2.0 Imports: 12 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Location  string
	Protocol  string
	Username  string
	Password  string
	VerifySsl bool
	Timeout   time.Interval
}

type LeaderResponse added in v0.3.1

type LeaderResponse struct {
	Leader string `json:"leader"`
}

type Marathon

type Marathon struct {
	Location string
	Protocol string
	Auth     *url.Userinfo
	// contains filtered or unexported fields
}

func New

func New(config Config) (*Marathon, error)

func (Marathon) App

func (m Marathon) App(appID apps.AppID) (*apps.App, error)

func (Marathon) ConsulApps added in v0.3.6

func (m Marathon) ConsulApps() ([]*apps.App, error)

func (Marathon) Leader added in v0.3.1

func (m Marathon) Leader() (string, error)

func (Marathon) Tasks

func (m Marathon) Tasks(app apps.AppID) ([]*apps.Task, error)

type Marathoner

type Marathoner interface {
	ConsulApps() ([]*apps.App, error)
	App(apps.AppID) (*apps.App, error)
	Tasks(apps.AppID) ([]*apps.Task, error)
	Leader() (string, error)
}

type MarathonerStub

type MarathonerStub struct {
	AppsStub  []*apps.App
	AppStub   map[apps.AppID]*apps.App
	TasksStub map[apps.AppID][]*apps.Task
	// contains filtered or unexported fields
}

func MarathonerStubForApps

func MarathonerStubForApps(args ...*apps.App) *MarathonerStub

func MarathonerStubWithLeaderForApps added in v0.3.1

func MarathonerStubWithLeaderForApps(leader string, args ...*apps.App) *MarathonerStub

func (*MarathonerStub) App

func (m *MarathonerStub) App(id apps.AppID) (*apps.App, error)

func (*MarathonerStub) ConsulApps added in v0.3.6

func (m *MarathonerStub) ConsulApps() ([]*apps.App, error)

func (MarathonerStub) Interactions added in v0.4.0

func (m MarathonerStub) Interactions() bool

func (*MarathonerStub) Leader added in v0.3.1

func (m *MarathonerStub) Leader() (string, error)

func (*MarathonerStub) Tasks

func (m *MarathonerStub) Tasks(appID apps.AppID) ([]*apps.Task, error)

Jump to

Keyboard shortcuts

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