v1

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2015 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteKeyHandler

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

Removes a key from the store.

func GetKeyHandler

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

Retrieves the value for a given key.

func SetKeyHandler

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

Sets the value for a given key.

func WatchKeyHandler

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

Watches a given key prefix for changes.

Types

type Server

type Server interface {
	CommitIndex() uint64
	Term() uint64
	Store() store.Store
	Dispatch(raft.Command, http.ResponseWriter, *http.Request) error
}

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

Jump to

Keyboard shortcuts

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