Documentation ¶
Overview ¶
Package cfgmgmt is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- func RegisterConfigMgmtHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterConfigMgmtHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConfigMgmtClient) error
- func RegisterConfigMgmtHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterConfigMgmtServer(s *grpc.Server, srv ConfigMgmtServer)
- type ConfigMgmtClient
- type ConfigMgmtServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterConfigMgmtHandler ¶
func RegisterConfigMgmtHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterConfigMgmtHandler registers the http handlers for service ConfigMgmt to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterConfigMgmtHandlerClient ¶
func RegisterConfigMgmtHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ConfigMgmtClient) error
RegisterConfigMgmtHandlerClient registers the http handlers for service ConfigMgmt to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ConfigMgmtClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ConfigMgmtClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ConfigMgmtClient" to call the correct interceptors.
func RegisterConfigMgmtHandlerFromEndpoint ¶
func RegisterConfigMgmtHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterConfigMgmtHandlerFromEndpoint is same as RegisterConfigMgmtHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterConfigMgmtServer ¶
func RegisterConfigMgmtServer(s *grpc.Server, srv ConfigMgmtServer)
Types ¶
type ConfigMgmtClient ¶
type ConfigMgmtClient interface { GetNodes(ctx context.Context, in *request.Nodes, opts ...grpc.CallOption) (*_struct.ListValue, error) GetRuns(ctx context.Context, in *request.Runs, opts ...grpc.CallOption) (*_struct.ListValue, error) GetNodesCounts(ctx context.Context, in *request.NodesCounts, opts ...grpc.CallOption) (*response.NodesCounts, error) GetRunsCounts(ctx context.Context, in *request.RunsCounts, opts ...grpc.CallOption) (*response.RunsCounts, error) GetNodeRun(ctx context.Context, in *request.NodeRun, opts ...grpc.CallOption) (*response.Run, error) GetSuggestions(ctx context.Context, in *query.Suggestion, opts ...grpc.CallOption) (*_struct.ListValue, error) GetOrganizations(ctx context.Context, in *request.Organizations, opts ...grpc.CallOption) (*_struct.ListValue, error) GetSourceFqdns(ctx context.Context, in *request.SourceFqdns, opts ...grpc.CallOption) (*_struct.ListValue, error) GetAttributes(ctx context.Context, in *request.Node, opts ...grpc.CallOption) (*response.NodeAttribute, error) GetVersion(ctx context.Context, in *version.VersionInfoRequest, opts ...grpc.CallOption) (*version.VersionInfo, error) GetPolicyCookbooks(ctx context.Context, in *request.PolicyRevision, opts ...grpc.CallOption) (*response.PolicyCookbooks, error) }
ConfigMgmtClient is the client API for ConfigMgmt service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewConfigMgmtClient ¶
func NewConfigMgmtClient(cc *grpc.ClientConn) ConfigMgmtClient
type ConfigMgmtServer ¶
type ConfigMgmtServer interface { GetNodes(context.Context, *request.Nodes) (*_struct.ListValue, error) GetRuns(context.Context, *request.Runs) (*_struct.ListValue, error) GetNodesCounts(context.Context, *request.NodesCounts) (*response.NodesCounts, error) GetRunsCounts(context.Context, *request.RunsCounts) (*response.RunsCounts, error) GetNodeRun(context.Context, *request.NodeRun) (*response.Run, error) GetSuggestions(context.Context, *query.Suggestion) (*_struct.ListValue, error) GetOrganizations(context.Context, *request.Organizations) (*_struct.ListValue, error) GetSourceFqdns(context.Context, *request.SourceFqdns) (*_struct.ListValue, error) GetAttributes(context.Context, *request.Node) (*response.NodeAttribute, error) GetVersion(context.Context, *version.VersionInfoRequest) (*version.VersionInfo, error) GetPolicyCookbooks(context.Context, *request.PolicyRevision) (*response.PolicyCookbooks, error) }
ConfigMgmtServer is the server API for ConfigMgmt service.