mesos

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flags

type Flags struct {
	Authenticate       string `json:"authenticate"`
	AuthenticateSlaves string `json:"authenticate_slaves"`
}

Flags holds the flags provided to Mesos

type Framework

type Framework struct {
	Name             string  `json:"name"`
	ID               string  `json:"id"`
	PID              string  `json:"pid"`
	Active           bool    `json:"active"`
	Hostname         string  `json:"hostname"`
	User             string  `json:"user"`
	RegisteredTime   float64 `json:"registered_time"`
	ReregisteredTime float64 `json:"reregistered_time"`
	Tasks            []*Task `json:"tasks"`
}

Framework holds a Mesos Framework

type Mesos

type Mesos struct {
	// contains filtered or unexported fields
}

Mesos holds a Mesos Client

func New

func New(httpClient *http.Client, url string) *Mesos

New creates a new Mesos client

func (*Mesos) CompletedFrameworks

func (m *Mesos) CompletedFrameworks() ([]*Framework, error)

CompletedFrameworks gets the completed frameworks

func (*Mesos) FindFramework

func (m *Mesos) FindFramework(name string) (*Framework, error)

FindFramework is trying to find a framework by name

func (*Mesos) FindFrameworks

func (m *Mesos) FindFrameworks(name string) ([]*Framework, error)

SearchFrameworks is searching frameworks in Mesos

func (*Mesos) Frameworks

func (m *Mesos) Frameworks() ([]*Framework, error)

Frameworks gets the mesos frameworks

func (*Mesos) Shutdown

func (m *Mesos) Shutdown(frameworkID string) error

Shutdown is shutting down a framework

func (*Mesos) State

func (m *Mesos) State() (*State, error)

State gets the state of the Mesos master

type State

type State struct {
	CompletedFrameworks    []*Framework `json:"completed_frameworks"`
	Frameworks             []*Framework `json:"frameworks"`
	UnregisteredFrameworks []string     `json:"unregistered_frameworks"`
	Flags                  Flags        `json:"flags"`
}

State holds the current State of Mesos

type Task

type Task struct {
	FrameworkID string `json:"framework_id"`
	ID          string `json:"id"`
	Name        string `json:"name"`
	SlaveID     string `json:"slave_id"`
	State       string `json:"state"`
}

Task holds a Mesos Framework Task

Jump to

Keyboard shortcuts

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