etcd/server/v2/v2.go
Brandon Philips 72bf216cb4 fix(server/v2): redirect to ClientURL not PeerURL
If consistent is set you must redirect the client to the leader's
ClientURL not the PeerURL.
2013-12-02 18:20:11 -08:00

20 lines
417 B
Go

package v2
import (
"github.com/coreos/etcd/store"
"github.com/coreos/raft"
"net/http"
)
// The Server interface provides all the methods required for the v2 API.
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
}