v2.go 387 B

123456789101112131415161718
  1. package v2
  2. import (
  3. "github.com/coreos/etcd/store"
  4. "github.com/coreos/go-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. Store() *store.Store
  15. Dispatch(raft.Command, http.ResponseWriter, *http.Request) error
  16. }