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.