log

package
v0.8.0-rc5 Latest Latest
Warning

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

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

Documentation

Overview

Package log is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var AlertLogs_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "alerting.log.AlertLogs",
	HandlerType: (*AlertLogsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateAlertLog",
			Handler:    _AlertLogs_CreateAlertLog_Handler,
		},
		{
			MethodName: "ListAlertLogs",
			Handler:    _AlertLogs_ListAlertLogs_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "github.com/rancher/opni/plugins/pkg/apis/server/log/alerting.log.proto",
}

AlertLogs_ServiceDesc is the grpc.ServiceDesc for AlertLogs 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_server_log_alerting_log_proto protoreflect.FileDescriptor

Functions

func RegisterAlertLogsHandler

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

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

func RegisterAlertLogsHandlerClient

func RegisterAlertLogsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client AlertLogsClient) error

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

func RegisterAlertLogsHandlerFromEndpoint

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

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

func RegisterAlertLogsHandlerServer

func RegisterAlertLogsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server AlertLogsServer) error

RegisterAlertLogsHandlerServer registers the http handlers for service AlertLogs to "mux". UnaryRPC :call AlertLogsServer 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 RegisterAlertLogsHandlerFromEndpoint instead.

func RegisterAlertLogsServer

func RegisterAlertLogsServer(s grpc.ServiceRegistrar, srv AlertLogsServer)

Types

type AlertLogsClient

type AlertLogsClient interface {
	// alerting internal use only
	CreateAlertLog(ctx context.Context, in *v1.AlertLog, opts ...grpc.CallOption) (*emptypb.Empty, error)
	ListAlertLogs(ctx context.Context, in *v11.ListAlertLogRequest, opts ...grpc.CallOption) (*v11.InformativeAlertLogList, error)
}

AlertLogsClient is the client API for AlertLogs 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 NewAlertLogsClient

func NewAlertLogsClient(cc grpc.ClientConnInterface) AlertLogsClient

type AlertLogsServer

type AlertLogsServer interface {
	// alerting internal use only
	CreateAlertLog(context.Context, *v1.AlertLog) (*emptypb.Empty, error)
	ListAlertLogs(context.Context, *v11.ListAlertLogRequest) (*v11.InformativeAlertLogList, error)
	// contains filtered or unexported methods
}

AlertLogsServer is the server API for AlertLogs service. All implementations must embed UnimplementedAlertLogsServer for forward compatibility

type UnimplementedAlertLogsServer

type UnimplementedAlertLogsServer struct {
}

UnimplementedAlertLogsServer must be embedded to have forward compatible implementations.

func (UnimplementedAlertLogsServer) CreateAlertLog

func (UnimplementedAlertLogsServer) ListAlertLogs

type UnsafeAlertLogsServer

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

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

Jump to

Keyboard shortcuts

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