trigger

package
v0.7.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package trigger is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var Alerting_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "alerting.Alerting",
	HandlerType: (*AlertingServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "TriggerAlerts",
			Handler:    _Alerting_TriggerAlerts_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/rancher/opni/plugins/pkg/apis/trigger/alerting.trigger.proto",
}

Alerting_ServiceDesc is the grpc.ServiceDesc for Alerting service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_github_com_rancher_opni_plugins_pkg_apis_trigger_alerting_trigger_proto protoreflect.FileDescriptor

Functions

func RegisterAlertingHandler

func RegisterAlertingHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterAlertingHandler registers the http handlers for service Alerting to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterAlertingHandlerClient

func RegisterAlertingHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AlertingClient) error

RegisterAlertingHandlerClient registers the http handlers for service Alerting to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "AlertingClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "AlertingClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "AlertingClient" to call the correct interceptors.

func RegisterAlertingHandlerFromEndpoint

func RegisterAlertingHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterAlertingHandlerFromEndpoint is same as RegisterAlertingHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterAlertingHandlerServer

func RegisterAlertingHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AlertingServer) error

RegisterAlertingHandlerServer registers the http handlers for service Alerting to "mux". UnaryRPC :call AlertingServer 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 RegisterAlertingHandlerFromEndpoint instead.

func RegisterAlertingServer

func RegisterAlertingServer(s grpc.ServiceRegistrar, srv AlertingServer)

Types

type AlertingClient

type AlertingClient interface {
	// opni internal use
	TriggerAlerts(ctx context.Context, in *v1.TriggerAlertsRequest, opts ...grpc.CallOption) (*v1.TriggerAlertsResponse, error)
}

AlertingClient is the client API for Alerting 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 NewAlertingClient

func NewAlertingClient(cc grpc.ClientConnInterface) AlertingClient

type AlertingServer

type AlertingServer interface {
	// opni internal use
	TriggerAlerts(context.Context, *v1.TriggerAlertsRequest) (*v1.TriggerAlertsResponse, error)
	// contains filtered or unexported methods
}

AlertingServer is the server API for Alerting service. All implementations must embed UnimplementedAlertingServer for forward compatibility

type UnimplementedAlertingServer

type UnimplementedAlertingServer struct {
}

UnimplementedAlertingServer must be embedded to have forward compatible implementations.

func (UnimplementedAlertingServer) TriggerAlerts

type UnsafeAlertingServer

type UnsafeAlertingServer interface {
	// contains filtered or unexported methods
}

UnsafeAlertingServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AlertingServer will result in compilation errors.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL