etcd

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2014 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Etcd

type Etcd struct {
	Config *config.Config // etcd config

	Store         store.Store        // data store
	Registry      *server.Registry   // stores URL information for nodes
	Server        *server.Server     // http server, runs on 4001 by default
	PeerServer    *server.PeerServer // peer server, runs on 7001 by default
	StandbyServer *server.StandbyServer
	// contains filtered or unexported fields
}

func New

func New(c *config.Config) *Etcd

New returns a new Etcd instance.

func (*Etcd) Mode

func (e *Etcd) Mode() Mode

func (*Etcd) ReadyNotify

func (e *Etcd) ReadyNotify() <-chan bool

ReadyNotify returns a channel that is going to be closed when the etcd instance is ready to accept connections.

func (*Etcd) Run

func (e *Etcd) Run()

Run the etcd instance.

func (*Etcd) Stop

func (e *Etcd) Stop()

Stop the etcd instance.

type Mode

type Mode int
const (
	PeerMode Mode = iota
	StandbyMode
)

type ModeGetter

type ModeGetter interface {
	Mode() Mode
}

type ModeHandler

type ModeHandler struct {
	ModeGetter
	PeerModeHandler    http.Handler
	StandbyModeHandler http.Handler
}

func (*ModeHandler) ServeHTTP

func (h *ModeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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