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 ¶
- func RegisterCollectorHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterCollectorHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extPlugin.CollectorClient) error
- func RegisterCollectorHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterCollectorHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extPlugin.CollectorServer) error
- func RegisterJobHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterJobHandlerClient(ctx context.Context, mux *runtime.ServeMux, client extPlugin.JobClient) error
- func RegisterJobHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterJobHandlerServer(ctx context.Context, mux *runtime.ServeMux, server extPlugin.JobServer) error
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 ¶
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.