plugin

package
v0.0.0-...-8ca8f6b Latest Latest
Warning

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

Go to latest
Published: Jun 15, 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 RegisterCollectorHandler

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

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

func RegisterCollectorHandlerClient

func RegisterCollectorHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extPlugin.CollectorClient) error

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

func RegisterCollectorHandlerFromEndpoint

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

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

func RegisterCollectorHandlerServer

func RegisterCollectorHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extPlugin.CollectorServer) error

RegisterCollectorHandlerServer registers the http handlers for service Collector to "mux". UnaryRPC :call CollectorServer 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 RegisterCollectorHandlerFromEndpoint instead.

func RegisterJobHandler

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

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

func RegisterJobHandlerClient

func RegisterJobHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extPlugin.JobClient) error

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

func RegisterJobHandlerFromEndpoint

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

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

func RegisterJobHandlerServer

func RegisterJobHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extPlugin.JobServer) error

RegisterJobHandlerServer registers the http handlers for service Job to "mux". UnaryRPC :call JobServer 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 RegisterJobHandlerFromEndpoint instead.

Types

This section is empty.

Jump to

Keyboard shortcuts

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