v2.go 452 B

12345678910111213141516171819
  1. package v2
  2. import (
  3. "github.com/coreos/etcd/store"
  4. "github.com/coreos/etcd/third_party/github.com/goraft/raft"
  5. "net/http"
  6. )
  7. // The Server interface provides all the methods required for the v2 API.
  8. type Server interface {
  9. State() string
  10. Leader() string
  11. CommitIndex() uint64
  12. Term() uint64
  13. PeerURL(string) (string, bool)
  14. ClientURL(string) (string, bool)
  15. Store() store.Store
  16. Dispatch(raft.Command, http.ResponseWriter, *http.Request) error
  17. }