Documentation ¶
Overview ¶
Package condition is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterAlertConditionsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAlertConditionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AlertConditionsClient) error
- func RegisterAlertConditionsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAlertConditionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AlertConditionsServer) error
- func RegisterAlertConditionsServer(s grpc.ServiceRegistrar, srv AlertConditionsServer)
- type AlertConditionsClient
- type AlertConditionsServer
- type UnimplementedAlertConditionsServer
- func (UnimplementedAlertConditionsServer) ActivateSilence(context.Context, *v1.SilenceRequest) (*emptypb.Empty, error)
- func (UnimplementedAlertConditionsServer) AlertConditionStatus(context.Context, *v11.Reference) (*v1.AlertStatusResponse, error)
- func (UnimplementedAlertConditionsServer) CreateAlertCondition(context.Context, *v1.AlertCondition) (*v11.Reference, error)
- func (UnimplementedAlertConditionsServer) DeactivateSilence(context.Context, *v11.Reference) (*emptypb.Empty, error)
- func (UnimplementedAlertConditionsServer) DeleteAlertCondition(context.Context, *v11.Reference) (*emptypb.Empty, error)
- func (UnimplementedAlertConditionsServer) GetAlertCondition(context.Context, *v11.Reference) (*v1.AlertCondition, error)
- func (UnimplementedAlertConditionsServer) ListAlertConditionChoices(context.Context, *v1.AlertDetailChoicesRequest) (*v1.ListAlertTypeDetails, error)
- func (UnimplementedAlertConditionsServer) ListAlertConditions(context.Context, *v1.ListAlertConditionRequest) (*v1.AlertConditionList, error)
- func (UnimplementedAlertConditionsServer) Timeline(context.Context, *v1.TimelineRequest) (*v1.TimelineResponse, error)
- func (UnimplementedAlertConditionsServer) UpdateAlertCondition(context.Context, *v1.UpdateAlertConditionRequest) (*emptypb.Empty, error)
- type UnsafeAlertConditionsServer
Constants ¶
This section is empty.
Variables ¶
var AlertConditions_ServiceDesc = grpc.ServiceDesc{ ServiceName: "alerting.condition.AlertConditions", HandlerType: (*AlertConditionsServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateAlertCondition", Handler: _AlertConditions_CreateAlertCondition_Handler, }, { MethodName: "GetAlertCondition", Handler: _AlertConditions_GetAlertCondition_Handler, }, { MethodName: "ListAlertConditions", Handler: _AlertConditions_ListAlertConditions_Handler, }, { MethodName: "UpdateAlertCondition", Handler: _AlertConditions_UpdateAlertCondition_Handler, }, { MethodName: "ListAlertConditionChoices", Handler: _AlertConditions_ListAlertConditionChoices_Handler, }, { MethodName: "DeleteAlertCondition", Handler: _AlertConditions_DeleteAlertCondition_Handler, }, { MethodName: "AlertConditionStatus", Handler: _AlertConditions_AlertConditionStatus_Handler, }, { MethodName: "ActivateSilence", Handler: _AlertConditions_ActivateSilence_Handler, }, { MethodName: "DeactivateSilence", Handler: _AlertConditions_DeactivateSilence_Handler, }, { MethodName: "Timeline", Handler: _AlertConditions_Timeline_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "github.com/rancher/opni/plugins/pkg/apis/server/condition/alerting.condition.proto", }
AlertConditions_ServiceDesc is the grpc.ServiceDesc for AlertConditions 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_condition_alerting_condition_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAlertConditionsHandler ¶
func RegisterAlertConditionsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterAlertConditionsHandler registers the http handlers for service AlertConditions to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAlertConditionsHandlerClient ¶
func RegisterAlertConditionsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AlertConditionsClient) error
RegisterAlertConditionsHandlerClient registers the http handlers for service AlertConditions to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AlertConditionsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AlertConditionsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AlertConditionsClient" to call the correct interceptors.
func RegisterAlertConditionsHandlerFromEndpoint ¶
func RegisterAlertConditionsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAlertConditionsHandlerFromEndpoint is same as RegisterAlertConditionsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAlertConditionsHandlerServer ¶
func RegisterAlertConditionsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AlertConditionsServer) error
RegisterAlertConditionsHandlerServer registers the http handlers for service AlertConditions to "mux". UnaryRPC :call AlertConditionsServer 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 RegisterAlertConditionsHandlerFromEndpoint instead.
func RegisterAlertConditionsServer ¶
func RegisterAlertConditionsServer(s grpc.ServiceRegistrar, srv AlertConditionsServer)
Types ¶
type AlertConditionsClient ¶
type AlertConditionsClient interface { CreateAlertCondition(ctx context.Context, in *v1.AlertCondition, opts ...grpc.CallOption) (*v11.Reference, error) GetAlertCondition(ctx context.Context, in *v11.Reference, opts ...grpc.CallOption) (*v1.AlertCondition, error) ListAlertConditions(ctx context.Context, in *v1.ListAlertConditionRequest, opts ...grpc.CallOption) (*v1.AlertConditionList, error) UpdateAlertCondition(ctx context.Context, in *v1.UpdateAlertConditionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) ListAlertConditionChoices(ctx context.Context, in *v1.AlertDetailChoicesRequest, opts ...grpc.CallOption) (*v1.ListAlertTypeDetails, error) DeleteAlertCondition(ctx context.Context, in *v11.Reference, opts ...grpc.CallOption) (*emptypb.Empty, error) AlertConditionStatus(ctx context.Context, in *v11.Reference, opts ...grpc.CallOption) (*v1.AlertStatusResponse, error) // can only active silence when alert is in firing state (limitation of alertmanager) ActivateSilence(ctx context.Context, in *v1.SilenceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // id corresponds to conditionId DeactivateSilence(ctx context.Context, in *v11.Reference, opts ...grpc.CallOption) (*emptypb.Empty, error) Timeline(ctx context.Context, in *v1.TimelineRequest, opts ...grpc.CallOption) (*v1.TimelineResponse, error) }
AlertConditionsClient is the client API for AlertConditions 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 NewAlertConditionsClient ¶
func NewAlertConditionsClient(cc grpc.ClientConnInterface) AlertConditionsClient
type AlertConditionsServer ¶
type AlertConditionsServer interface { CreateAlertCondition(context.Context, *v1.AlertCondition) (*v11.Reference, error) GetAlertCondition(context.Context, *v11.Reference) (*v1.AlertCondition, error) ListAlertConditions(context.Context, *v1.ListAlertConditionRequest) (*v1.AlertConditionList, error) UpdateAlertCondition(context.Context, *v1.UpdateAlertConditionRequest) (*emptypb.Empty, error) ListAlertConditionChoices(context.Context, *v1.AlertDetailChoicesRequest) (*v1.ListAlertTypeDetails, error) DeleteAlertCondition(context.Context, *v11.Reference) (*emptypb.Empty, error) AlertConditionStatus(context.Context, *v11.Reference) (*v1.AlertStatusResponse, error) // can only active silence when alert is in firing state (limitation of alertmanager) ActivateSilence(context.Context, *v1.SilenceRequest) (*emptypb.Empty, error) // id corresponds to conditionId DeactivateSilence(context.Context, *v11.Reference) (*emptypb.Empty, error) Timeline(context.Context, *v1.TimelineRequest) (*v1.TimelineResponse, error) // contains filtered or unexported methods }
AlertConditionsServer is the server API for AlertConditions service. All implementations must embed UnimplementedAlertConditionsServer for forward compatibility
type UnimplementedAlertConditionsServer ¶
type UnimplementedAlertConditionsServer struct { }
UnimplementedAlertConditionsServer must be embedded to have forward compatible implementations.
func (UnimplementedAlertConditionsServer) ActivateSilence ¶
func (UnimplementedAlertConditionsServer) ActivateSilence(context.Context, *v1.SilenceRequest) (*emptypb.Empty, error)
func (UnimplementedAlertConditionsServer) AlertConditionStatus ¶
func (UnimplementedAlertConditionsServer) AlertConditionStatus(context.Context, *v11.Reference) (*v1.AlertStatusResponse, error)
func (UnimplementedAlertConditionsServer) CreateAlertCondition ¶
func (UnimplementedAlertConditionsServer) CreateAlertCondition(context.Context, *v1.AlertCondition) (*v11.Reference, error)
func (UnimplementedAlertConditionsServer) DeactivateSilence ¶
func (UnimplementedAlertConditionsServer) DeleteAlertCondition ¶
func (UnimplementedAlertConditionsServer) GetAlertCondition ¶
func (UnimplementedAlertConditionsServer) GetAlertCondition(context.Context, *v11.Reference) (*v1.AlertCondition, error)
func (UnimplementedAlertConditionsServer) ListAlertConditionChoices ¶
func (UnimplementedAlertConditionsServer) ListAlertConditionChoices(context.Context, *v1.AlertDetailChoicesRequest) (*v1.ListAlertTypeDetails, error)
func (UnimplementedAlertConditionsServer) ListAlertConditions ¶
func (UnimplementedAlertConditionsServer) ListAlertConditions(context.Context, *v1.ListAlertConditionRequest) (*v1.AlertConditionList, error)
func (UnimplementedAlertConditionsServer) Timeline ¶
func (UnimplementedAlertConditionsServer) Timeline(context.Context, *v1.TimelineRequest) (*v1.TimelineResponse, error)
func (UnimplementedAlertConditionsServer) UpdateAlertCondition ¶
func (UnimplementedAlertConditionsServer) UpdateAlertCondition(context.Context, *v1.UpdateAlertConditionRequest) (*emptypb.Empty, error)
type UnsafeAlertConditionsServer ¶
type UnsafeAlertConditionsServer interface {
// contains filtered or unexported methods
}
UnsafeAlertConditionsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AlertConditionsServer will result in compilation errors.