kubernetesk8s.io/kubernetes/pkg/election Index | Files

package election

import "k8s.io/kubernetes/pkg/election"

Package election provides interfaces used for master election.

Index

Types

type Master

type Master string

Master is used to announce the current elected master.

func (Master) IsAnAPIObject

func (Master) IsAnAPIObject()

IsAnAPIObject is used solely so we can work with the watch package. TODO: Either fix watch so this isn't necessary, or make this a real API Object. TODO: when it becomes clear how this package will be used, move these declarations to to the proper place.

type MasterElector

type MasterElector interface {
	// RequestMaster makes the caller represented by 'id' enter into a master election for the
	// distributed lock defined by 'path'
	// The returned watch.Interface provides a stream of Master objects which
	// contain the current master.
	// Calling Stop on the returned interface relinquishes ownership (if currently possesed)
	// and removes the caller from the election
	Elect(path, id string) watch.Interface
}

MasterElector is an interface for services that can elect masters. Important Note: MasterElectors are not inter-operable, all participants in the election need to be

using the same underlying implementation of this interface for correct behavior.

func NewEtcdMasterElector

func NewEtcdMasterElector(h tools.EtcdGetSet) MasterElector

NewEtcdMasterElector returns an implementation of election.MasterElector backed by etcd.

Source Files

doc.go etcd_master.go master.go

Version
v0.4.3
Published
Oct 30, 2014
Platform
js/wasm
Imports
7 packages
Last checked
4 minutes ago

Tools for package owners.