v2.go 453 B

1234567891011121314151617181920
  1. package v2
  2. import (
  3. "net/http"
  4. "github.com/coreos/etcd/store"
  5. "github.com/coreos/etcd/third_party/github.com/goraft/raft"
  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. }