Documentation ¶
Index ¶
- Constants
- func ClearZKState(zkServers []string, zkChroot string, frameworkName string) error
- func ConfigureInstance(running map[string]*config.Node, newInstance *config.Node) error
- func FixInstancePeers(node *config.Node) error
- func GetMasterFromZK(zkURI string) (string, error)
- func GetPeersFromState(state *MasterState, frameworkName string) ([]string, error)
- func GetPreviousFrameworkID(zkServers []string, zkChroot string, frameworkName string) (fwid string, err error)
- func GetPreviousReconciliationInfo(zkServers []string, zkChroot string, frameworkName string) (recon map[string]string, err error)
- func HealthCheck(running map[string]*config.Node) error
- func MemberList(running map[string]*config.Node) (nameToIdent map[string]string, err error)
- func ParseZKURI(zkURI string) (servers []string, chroot string, err error)
- func PersistFrameworkID(fwid *mesos.FrameworkID, zkServers []string, zkChroot string, ...) error
- func RankReseedCandidates(running map[string]*config.Node) []nodeIndex
- func RemoveInstance(running map[string]*config.Node, task string) error
- func TriggerReseed(node *config.Node) error
- func UpdateReconciliationInfo(reconciliationInfo map[string]string, zkServers []string, zkChroot string, ...) error
- type Framework
- type MasterState
- type Task
Constants ¶
View Source
const RPC_RETRIES = 5
View Source
const RPC_TIMEOUT = time.Second * 5
Variables ¶
This section is empty.
Functions ¶
func ClearZKState ¶
func ConfigureInstance ¶
func FixInstancePeers ¶
func GetMasterFromZK ¶
func GetPeersFromState ¶
func GetPeersFromState(state *MasterState, frameworkName string) ([]string, error)
func GetPreviousFrameworkID ¶
func HealthCheck ¶
HealthCheck performs basic sanity checks on an etcd cluster. This function explicitly forgoes backoffs. If it fails something, it is assumed to be unhealthy.
func MemberList ¶
func PersistFrameworkID ¶
func RankReseedCandidates ¶
func TriggerReseed ¶
Types ¶
type MasterState ¶
type MasterState struct {
Frameworks []Framework `json:"frameworks"`
}
This is only a partial section of the returned JSON. In the future we may need to add more fields if they have a reason to be queried. Hitting state.json is an antipattern, but we only do it during framework initialization.
func GetState ¶
func GetState(master string) (*MasterState, error)
type Task ¶
type Task struct { ExecutorID string `json:"executor_id"` FrameworkID string `json:"framework_id"` ID string `json:"id"` Name string `json:"name"` Resources struct { Cpus float64 `json:"cpus"` Disk float64 `json:"disk"` Mem float64 `json:"mem"` Ports string `json:"ports"` } `json:"resources"` SlaveID string `json:"slave_id"` State string `json:"state"` Statuses []struct { State string `json:"state"` Timestamp float64 `json:"timestamp"` } `json:"statuses"` }
Click to show internal directories.
Click to hide internal directories.