Documentation
¶
Overview ¶
Package endpoint is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterAlertEndpointsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAlertEndpointsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AlertEndpointsClient) error
- func RegisterAlertEndpointsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAlertEndpointsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AlertEndpointsServer) error
- func RegisterAlertEndpointsServer(s grpc.ServiceRegistrar, srv AlertEndpointsServer)
- type AlertEndpointsClient
- type AlertEndpointsServer
- type UnimplementedAlertEndpointsServer
- func (UnimplementedAlertEndpointsServer) CreateAlertEndpoint(context.Context, *v1.AlertEndpoint) (*v11.Reference, error)
- func (UnimplementedAlertEndpointsServer) CreateConditionRoutingNode(context.Context, *v1.RoutingNode) (*emptypb.Empty, error)
- func (UnimplementedAlertEndpointsServer) DeleteAlertEndpoint(context.Context, *v1.DeleteAlertEndpointRequest) (*v1.InvolvedConditions, error)
- func (UnimplementedAlertEndpointsServer) DeleteConditionRoutingNode(context.Context, *v11.Reference) (*emptypb.Empty, error)
- func (UnimplementedAlertEndpointsServer) DeleteIndividualEndpointInRoutingNode(context.Context, *v11.Reference) (*emptypb.Empty, error)
- func (UnimplementedAlertEndpointsServer) EphemeralDispatcher(context.Context, *v1.EphemeralDispatcherRequest) (*v1.EphemeralDispatcherResponse, error)
- func (UnimplementedAlertEndpointsServer) GetAlertEndpoint(context.Context, *v11.Reference) (*v1.AlertEndpoint, error)
- func (UnimplementedAlertEndpointsServer) ListAlertEndpoints(context.Context, *v1.ListAlertEndpointsRequest) (*v1.AlertEndpointList, error)
- func (UnimplementedAlertEndpointsServer) ListRoutingRelationships(context.Context, *emptypb.Empty) (*v1.RoutingRelationships, error)
- func (UnimplementedAlertEndpointsServer) TestAlertEndpoint(context.Context, *v1.TestAlertEndpointRequest) (*v1.TestAlertEndpointResponse, error)
- func (UnimplementedAlertEndpointsServer) UpdateAlertEndpoint(context.Context, *v1.UpdateAlertEndpointRequest) (*v1.InvolvedConditions, error)
- func (UnimplementedAlertEndpointsServer) UpdateConditionRoutingNode(context.Context, *v1.RoutingNode) (*emptypb.Empty, error)
- func (UnimplementedAlertEndpointsServer) UpdateIndividualEndpointInRoutingNode(context.Context, *v1.FullAttachedEndpoint) (*emptypb.Empty, error)
- type UnsafeAlertEndpointsServer
Constants ¶
This section is empty.
Variables ¶
var AlertEndpoints_ServiceDesc = grpc.ServiceDesc{ ServiceName: "alerting.endpoint.AlertEndpoints", HandlerType: (*AlertEndpointsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateAlertEndpoint", Handler: _AlertEndpoints_CreateAlertEndpoint_Handler, }, { MethodName: "GetAlertEndpoint", Handler: _AlertEndpoints_GetAlertEndpoint_Handler, }, { MethodName: "ListAlertEndpoints", Handler: _AlertEndpoints_ListAlertEndpoints_Handler, }, { MethodName: "UpdateAlertEndpoint", Handler: _AlertEndpoints_UpdateAlertEndpoint_Handler, }, { MethodName: "DeleteAlertEndpoint", Handler: _AlertEndpoints_DeleteAlertEndpoint_Handler, }, { MethodName: "EphemeralDispatcher", Handler: _AlertEndpoints_EphemeralDispatcher_Handler, }, { MethodName: "TestAlertEndpoint", Handler: _AlertEndpoints_TestAlertEndpoint_Handler, }, { MethodName: "ListRoutingRelationships", Handler: _AlertEndpoints_ListRoutingRelationships_Handler, }, { MethodName: "CreateConditionRoutingNode", Handler: _AlertEndpoints_CreateConditionRoutingNode_Handler, }, { MethodName: "UpdateConditionRoutingNode", Handler: _AlertEndpoints_UpdateConditionRoutingNode_Handler, }, { MethodName: "DeleteConditionRoutingNode", Handler: _AlertEndpoints_DeleteConditionRoutingNode_Handler, }, { MethodName: "UpdateIndividualEndpointInRoutingNode", Handler: _AlertEndpoints_UpdateIndividualEndpointInRoutingNode_Handler, }, { MethodName: "DeleteIndividualEndpointInRoutingNode", Handler: _AlertEndpoints_DeleteIndividualEndpointInRoutingNode_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/rancher/opni/plugins/pkg/apis/server/endpoint/alerting.endpoint.proto", }
AlertEndpoints_ServiceDesc is the grpc.ServiceDesc for AlertEndpoints service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_github_com_rancher_opni_plugins_pkg_apis_server_endpoint_alerting_endpoint_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAlertEndpointsHandler ¶
func RegisterAlertEndpointsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterAlertEndpointsHandler registers the http handlers for service AlertEndpoints to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAlertEndpointsHandlerClient ¶
func RegisterAlertEndpointsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AlertEndpointsClient) error
RegisterAlertEndpointsHandlerClient registers the http handlers for service AlertEndpoints to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AlertEndpointsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AlertEndpointsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AlertEndpointsClient" to call the correct interceptors.
func RegisterAlertEndpointsHandlerFromEndpoint ¶
func RegisterAlertEndpointsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAlertEndpointsHandlerFromEndpoint is same as RegisterAlertEndpointsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAlertEndpointsHandlerServer ¶
func RegisterAlertEndpointsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AlertEndpointsServer) error
RegisterAlertEndpointsHandlerServer registers the http handlers for service AlertEndpoints to "mux". UnaryRPC :call AlertEndpointsServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAlertEndpointsHandlerFromEndpoint instead.
func RegisterAlertEndpointsServer ¶
func RegisterAlertEndpointsServer(s grpc.ServiceRegistrar, srv AlertEndpointsServer)
Types ¶
type AlertEndpointsClient ¶
type AlertEndpointsClient interface { CreateAlertEndpoint(ctx context.Context, in *v1.AlertEndpoint, opts ...grpc.CallOption) (*v11.Reference, error) GetAlertEndpoint(ctx context.Context, in *v11.Reference, opts ...grpc.CallOption) (*v1.AlertEndpoint, error) ListAlertEndpoints(ctx context.Context, in *v1.ListAlertEndpointsRequest, opts ...grpc.CallOption) (*v1.AlertEndpointList, error) // when forceUpdate = false, // returns a list of conditions this would affect (if none, applies the update) // when forceUpdate = true, // // updates everything without warning UpdateAlertEndpoint(ctx context.Context, in *v1.UpdateAlertEndpointRequest, opts ...grpc.CallOption) (*v1.InvolvedConditions, error) // when forceDelete = false, // returns a list of conditions this would affect (if none, applies the delete) // when forceDelete = true // deletes and applies the consequences of those changes to everything without warning DeleteAlertEndpoint(ctx context.Context, in *v1.DeleteAlertEndpointRequest, opts ...grpc.CallOption) (*v1.InvolvedConditions, error) EphemeralDispatcher(ctx context.Context, in *v1.EphemeralDispatcherRequest, opts ...grpc.CallOption) (*v1.EphemeralDispatcherResponse, error) TestAlertEndpoint(ctx context.Context, in *v1.TestAlertEndpointRequest, opts ...grpc.CallOption) (*v1.TestAlertEndpointResponse, error) // alerting internal use only ListRoutingRelationships(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*v1.RoutingRelationships, error) // alerting internal use only // creates a node in the alertmanager config to be routed to // by the conditionId // it uses the endpoint id to fetch the implementation type // and attaches the remaining details to that endpoint CreateConditionRoutingNode(ctx context.Context, in *v1.RoutingNode, opts ...grpc.CallOption) (*emptypb.Empty, error) // alerting internal use only // updates a node in the alertmanager config to be routed to // by the conditionId // it uses the endpoint id to fetch (&update if necessary) UpdateConditionRoutingNode(ctx context.Context, in *v1.RoutingNode, opts ...grpc.CallOption) (*emptypb.Empty, error) // alerting internal use only // conditionMustBePassed in here DeleteConditionRoutingNode(ctx context.Context, in *v11.Reference, opts ...grpc.CallOption) (*emptypb.Empty, error) // alerting internal use only // If a defined endpoint is changed then change its references in the // routing tree UpdateIndividualEndpointInRoutingNode(ctx context.Context, in *v1.FullAttachedEndpoint, opts ...grpc.CallOption) (*emptypb.Empty, error) // alerting internal use only // If a defined endpoint is deleted then delete it from the routing // tree DeleteIndividualEndpointInRoutingNode(ctx context.Context, in *v11.Reference, opts ...grpc.CallOption) (*emptypb.Empty, error) }
AlertEndpointsClient is the client API for AlertEndpoints service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewAlertEndpointsClient ¶
func NewAlertEndpointsClient(cc grpc.ClientConnInterface) AlertEndpointsClient
type AlertEndpointsServer ¶
type AlertEndpointsServer interface { CreateAlertEndpoint(context.Context, *v1.AlertEndpoint) (*v11.Reference, error) GetAlertEndpoint(context.Context, *v11.Reference) (*v1.AlertEndpoint, error) ListAlertEndpoints(context.Context, *v1.ListAlertEndpointsRequest) (*v1.AlertEndpointList, error) // when forceUpdate = false, // returns a list of conditions this would affect (if none, applies the update) // when forceUpdate = true, // // updates everything without warning UpdateAlertEndpoint(context.Context, *v1.UpdateAlertEndpointRequest) (*v1.InvolvedConditions, error) // when forceDelete = false, // returns a list of conditions this would affect (if none, applies the delete) // when forceDelete = true // deletes and applies the consequences of those changes to everything without warning DeleteAlertEndpoint(context.Context, *v1.DeleteAlertEndpointRequest) (*v1.InvolvedConditions, error) EphemeralDispatcher(context.Context, *v1.EphemeralDispatcherRequest) (*v1.EphemeralDispatcherResponse, error) TestAlertEndpoint(context.Context, *v1.TestAlertEndpointRequest) (*v1.TestAlertEndpointResponse, error) // alerting internal use only ListRoutingRelationships(context.Context, *emptypb.Empty) (*v1.RoutingRelationships, error) // alerting internal use only // creates a node in the alertmanager config to be routed to // by the conditionId // it uses the endpoint id to fetch the implementation type // and attaches the remaining details to that endpoint CreateConditionRoutingNode(context.Context, *v1.RoutingNode) (*emptypb.Empty, error) // alerting internal use only // updates a node in the alertmanager config to be routed to // by the conditionId // it uses the endpoint id to fetch (&update if necessary) UpdateConditionRoutingNode(context.Context, *v1.RoutingNode) (*emptypb.Empty, error) // alerting internal use only // conditionMustBePassed in here DeleteConditionRoutingNode(context.Context, *v11.Reference) (*emptypb.Empty, error) // alerting internal use only // If a defined endpoint is changed then change its references in the // routing tree UpdateIndividualEndpointInRoutingNode(context.Context, *v1.FullAttachedEndpoint) (*emptypb.Empty, error) // alerting internal use only // If a defined endpoint is deleted then delete it from the routing // tree DeleteIndividualEndpointInRoutingNode(context.Context, *v11.Reference) (*emptypb.Empty, error) // contains filtered or unexported methods }
AlertEndpointsServer is the server API for AlertEndpoints service. All implementations must embed UnimplementedAlertEndpointsServer for forward compatibility
type UnimplementedAlertEndpointsServer ¶
type UnimplementedAlertEndpointsServer struct { }
UnimplementedAlertEndpointsServer must be embedded to have forward compatible implementations.
func (UnimplementedAlertEndpointsServer) CreateAlertEndpoint ¶
func (UnimplementedAlertEndpointsServer) CreateAlertEndpoint(context.Context, *v1.AlertEndpoint) (*v11.Reference, error)
func (UnimplementedAlertEndpointsServer) CreateConditionRoutingNode ¶
func (UnimplementedAlertEndpointsServer) CreateConditionRoutingNode(context.Context, *v1.RoutingNode) (*emptypb.Empty, error)
func (UnimplementedAlertEndpointsServer) DeleteAlertEndpoint ¶
func (UnimplementedAlertEndpointsServer) DeleteAlertEndpoint(context.Context, *v1.DeleteAlertEndpointRequest) (*v1.InvolvedConditions, error)
func (UnimplementedAlertEndpointsServer) DeleteConditionRoutingNode ¶
func (UnimplementedAlertEndpointsServer) DeleteIndividualEndpointInRoutingNode ¶
func (UnimplementedAlertEndpointsServer) EphemeralDispatcher ¶ added in v0.8.0
func (UnimplementedAlertEndpointsServer) EphemeralDispatcher(context.Context, *v1.EphemeralDispatcherRequest) (*v1.EphemeralDispatcherResponse, error)
func (UnimplementedAlertEndpointsServer) GetAlertEndpoint ¶
func (UnimplementedAlertEndpointsServer) GetAlertEndpoint(context.Context, *v11.Reference) (*v1.AlertEndpoint, error)
func (UnimplementedAlertEndpointsServer) ListAlertEndpoints ¶
func (UnimplementedAlertEndpointsServer) ListAlertEndpoints(context.Context, *v1.ListAlertEndpointsRequest) (*v1.AlertEndpointList, error)
func (UnimplementedAlertEndpointsServer) ListRoutingRelationships ¶
func (UnimplementedAlertEndpointsServer) ListRoutingRelationships(context.Context, *emptypb.Empty) (*v1.RoutingRelationships, error)
func (UnimplementedAlertEndpointsServer) TestAlertEndpoint ¶
func (UnimplementedAlertEndpointsServer) TestAlertEndpoint(context.Context, *v1.TestAlertEndpointRequest) (*v1.TestAlertEndpointResponse, error)
func (UnimplementedAlertEndpointsServer) UpdateAlertEndpoint ¶
func (UnimplementedAlertEndpointsServer) UpdateAlertEndpoint(context.Context, *v1.UpdateAlertEndpointRequest) (*v1.InvolvedConditions, error)
func (UnimplementedAlertEndpointsServer) UpdateConditionRoutingNode ¶
func (UnimplementedAlertEndpointsServer) UpdateConditionRoutingNode(context.Context, *v1.RoutingNode) (*emptypb.Empty, error)
func (UnimplementedAlertEndpointsServer) UpdateIndividualEndpointInRoutingNode ¶
func (UnimplementedAlertEndpointsServer) UpdateIndividualEndpointInRoutingNode(context.Context, *v1.FullAttachedEndpoint) (*emptypb.Empty, error)
type UnsafeAlertEndpointsServer ¶
type UnsafeAlertEndpointsServer interface {
// contains filtered or unexported methods
}
UnsafeAlertEndpointsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AlertEndpointsServer will result in compilation errors.