diff --git a/consul/kvs_endpoint.go b/consul/kvs_endpoint.go new file mode 100644 index 0000000000..9d47bfe49b --- /dev/null +++ b/consul/kvs_endpoint.go @@ -0,0 +1,8 @@ +package consul + +import () + +// KVS endpoint is used to manipulate the Key-Value store +type KVS struct { + srv *Server +} diff --git a/consul/server.go b/consul/server.go index ccd28e9811..9a4a6a59f0 100644 --- a/consul/server.go +++ b/consul/server.go @@ -101,6 +101,7 @@ type endpoints struct { Health *Health Raft *Raft Status *Status + KVS *KVS } // NewServer is used to construct a new Consul server from the @@ -276,12 +277,14 @@ func (s *Server) setupRPC() error { s.endpoints.Raft = &Raft{s} s.endpoints.Catalog = &Catalog{s} s.endpoints.Health = &Health{s} + s.endpoints.KVS = &KVS{s} // Register the handlers s.rpcServer.Register(s.endpoints.Status) s.rpcServer.Register(s.endpoints.Raft) s.rpcServer.Register(s.endpoints.Catalog) s.rpcServer.Register(s.endpoints.Health) + s.rpcServer.Register(s.endpoints.KVS) list, err := net.ListenTCP("tcp", s.config.RPCAddr) if err != nil {