client

package
v0.7.0-rc2 Latest Latest
Warning

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

Go to latest
Published: May 10, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadMasterState

func LoadMasterState(client httpcli.Doer, stateEndpoint urls.Builder, ip, port string, unmarshal Unmarshaler) (sj state.State, _ error)

LoadMasterState loads state from mesos master

func LoadMasterStateFailover

func LoadMasterStateFailover(initialMasterIP string, stateLoader func(ip string) (state.State, error)) (state.State, error)

LoadMasterStateFailover catches an attempt to load state from a mesos master. Attempts can fail from due to a down server or if contacting a mesos master secondary. It reloads from a different master if the contacted master is a secondary.

func LoadMasterStateTryAll

func LoadMasterStateTryAll(masters []string, stateLoader func(ip, port string) (state.State, error)) (state.State, error)

LoadMasterStateTryAll tries each master and looks for the leader; if no leader responds it errors. The first master in the list is assumed to be the leading mesos master.

Types

type StateLoader

type StateLoader func(masters []string) (state.State, error)

StateLoader attempts to read state from the leading Mesos master and return the parsed content.

func NewStateLoader

func NewStateLoader(doer httpcli.Doer, initialEndpoint urls.Builder, unmarshal Unmarshaler) StateLoader

NewStateLoader generates a new Mesos master state loader using the given http client and initial endpoint.

type Unmarshaler

type Unmarshaler func([]byte, *state.State) error

Unmarshaler parses raw byte content into a State object

Jump to

Keyboard shortcuts

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