Fix compilation of command
This commit is contained in:
1 parent
19f74a8247
commit
6254e18698
5 files changed
+31
-30
No files matched your search
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
"github.com/hashicorp/vault/internalshared/configutil"
|
||||
"github.com/hashicorp/watchtower/globals"
|
||||
"github.com/hashicorp/watchtower/internal/gen/controller/api"
|
||||
"github.com/hashicorp/watchtower/internal/gen/controller/api/services"
|
||||
"github.com/hashicorp/watchtower/internal/servers/controller/handlers/host_catalogs"
|
||||
"github.com/hashicorp/watchtower/internal/servers/controller/handlers/host_sets"
|
||||
"github.com/hashicorp/watchtower/internal/servers/controller/handlers/hosts"
|
||||
@@ -18,7 +18,7 @@ type HandlerProperties struct {
|
||||
ListenerConfig *configutil.Listener
|
||||
}
|
||||
|
||||
// Handler returns an http.Handler for the API. This can be used on
|
||||
// Handler returns an http.Handler for the services. This can be used on
|
||||
// its own to mount the Vault API within another web server.
|
||||
func Handler(props HandlerProperties) http.Handler {
|
||||
// Create the muxer to handle the actual endpoints
|
||||
@@ -34,9 +34,9 @@ func Handler(props HandlerProperties) http.Handler {
|
||||
func handleGrpcGateway() http.Handler {
|
||||
ignored := context.Background()
|
||||
mux := runtime.NewServeMux()
|
||||
api.RegisterHostCatalogServiceHandlerServer(ignored, mux, &host_catalogs.Service{})
|
||||
api.RegisterHostSetServiceHandlerServer(ignored, mux, &host_sets.Service{})
|
||||
api.RegisterHostServiceHandlerServer(ignored, mux, &hosts.Service{})
|
||||
services.RegisterHostCatalogServiceHandlerServer(ignored, mux, &host_catalogs.Service{})
|
||||
services.RegisterHostSetServiceHandlerServer(ignored, mux, &host_sets.Service{})
|
||||
services.RegisterHostServiceHandlerServer(ignored, mux, &hosts.Service{})
|
||||
|
||||
return mux
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user