Documentation ¶
Index ¶
- func LoadMasterState(client httpcli.Doer, stateEndpoint urls.Builder, ip, port string, ...) (sj state.State, _ error)
- func LoadMasterStateFailover(initialMasterIP string, stateLoader func(ip string) (state.State, error)) (state.State, error)
- func LoadMasterStateTryAll(masters []string, stateLoader func(ip, port string) (state.State, error)) (state.State, error)
- type StateLoader
- type Unmarshaler
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 ¶
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.