plugin

package
v0.0.0-...-ae3c806 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package plugin is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package plugin is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterNotificationHandler

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

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

func RegisterNotificationHandlerClient

func RegisterNotificationHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extPlugin.NotificationClient) error

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

func RegisterNotificationHandlerFromEndpoint

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

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

func RegisterNotificationHandlerServer

func RegisterNotificationHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extPlugin.NotificationServer) error

RegisterNotificationHandlerServer registers the http handlers for service Notification to "mux". UnaryRPC :call NotificationServer 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 RegisterNotificationHandlerFromEndpoint instead.

func RegisterProtocolHandler

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

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

func RegisterProtocolHandlerClient

func RegisterProtocolHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extPlugin.ProtocolClient) error

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

func RegisterProtocolHandlerFromEndpoint

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

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

func RegisterProtocolHandlerServer

func RegisterProtocolHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extPlugin.ProtocolServer) error

RegisterProtocolHandlerServer registers the http handlers for service Protocol to "mux". UnaryRPC :call ProtocolServer 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 RegisterProtocolHandlerFromEndpoint instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

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