Back to godoc.org

Package v2

v0.2.0
Latest Go to latest

The latest major version is .

Published: Dec 23, 2013 | License: Apache-2.0 | Module: go.etcd.io/etcd

Index

func CreateHandler

func CreateHandler(w http.ResponseWriter, req *http.Request, s Server, key string, dir bool, value string, expireTime time.Time) error

func DeleteHandler

func DeleteHandler(w http.ResponseWriter, req *http.Request, s Server) error

func GetHandler

func GetHandler(w http.ResponseWriter, req *http.Request, s Server) error

func PostHandler

func PostHandler(w http.ResponseWriter, req *http.Request, s Server) error

func PutHandler

func PutHandler(w http.ResponseWriter, req *http.Request, s Server) error

func SetHandler

func SetHandler(w http.ResponseWriter, req *http.Request, s Server, key string, dir bool, value string, expireTime time.Time) error

func UpdateHandler

func UpdateHandler(w http.ResponseWriter, req *http.Request, s Server, key, value string, expireTime time.Time) error

type Server

type Server interface {
	State() string
	Leader() string
	CommitIndex() uint64
	Term() uint64
	PeerURL(string) (string, bool)
	ClientURL(string) (string, bool)
	Store() store.Store
	Dispatch(raft.Command, http.ResponseWriter, *http.Request) error
}

The Server interface provides all the methods required for the v2 API.

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier