github.com/jpetazzo/etcd@v0.2.1-0.20140113055439-97f1363afac5/server/v2/v2.go (about) 1 package v2 2 3 import ( 4 "github.com/coreos/etcd/store" 5 "github.com/coreos/raft" 6 "net/http" 7 ) 8 9 // The Server interface provides all the methods required for the v2 API. 10 type Server interface { 11 State() string 12 Leader() string 13 CommitIndex() uint64 14 Term() uint64 15 PeerURL(string) (string, bool) 16 ClientURL(string) (string, bool) 17 Store() store.Store 18 Dispatch(raft.Command, http.ResponseWriter, *http.Request) error 19 }