v2

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2014 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

Types

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.

Jump to

Keyboard shortcuts

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