Documentation
¶
Overview ¶
Package definition is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func RegisterShutdownV1Handler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterShutdownV1HandlerClient(ctx context.Context, mux *runtime.ServeMux, client ShutdownV1Client) error
- func RegisterShutdownV1HandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterShutdownV1HandlerServer(ctx context.Context, mux *runtime.ServeMux, server ShutdownV1Server) error
- func RegisterShutdownV1Server(s grpc.ServiceRegistrar, srv ShutdownV1Server)
- type ShutdownV1Client
- type ShutdownV1Server
- type UnimplementedShutdownV1Server
- type UnsafeShutdownV1Server
Constants ¶
const (
Name = "shutdown.v1"
)
const (
ShutdownV1_Shutdown_FullMethodName = "/shutdown.ShutdownV1/Shutdown"
)
Variables ¶
var File_integrations_shutdown_v1_definition_shutdown_proto protoreflect.FileDescriptor
var ShutdownV1_ServiceDesc = grpc.ServiceDesc{ ServiceName: "shutdown.ShutdownV1", HandlerType: (*ShutdownV1Server)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Shutdown", Handler: _ShutdownV1_Shutdown_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "integrations/shutdown/v1/definition/shutdown.proto", }
ShutdownV1_ServiceDesc is the grpc.ServiceDesc for ShutdownV1 service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterShutdownV1Handler ¶
func RegisterShutdownV1Handler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterShutdownV1Handler registers the http handlers for service ShutdownV1 to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterShutdownV1HandlerClient ¶
func RegisterShutdownV1HandlerClient(ctx context.Context, mux *runtime.ServeMux, client ShutdownV1Client) error
RegisterShutdownV1HandlerClient registers the http handlers for service ShutdownV1 to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ShutdownV1Client". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ShutdownV1Client" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ShutdownV1Client" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterShutdownV1HandlerFromEndpoint ¶
func RegisterShutdownV1HandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterShutdownV1HandlerFromEndpoint is same as RegisterShutdownV1Handler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterShutdownV1HandlerServer ¶
func RegisterShutdownV1HandlerServer(ctx context.Context, mux *runtime.ServeMux, server ShutdownV1Server) error
RegisterShutdownV1HandlerServer registers the http handlers for service ShutdownV1 to "mux". UnaryRPC :call ShutdownV1Server 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 RegisterShutdownV1HandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterShutdownV1Server ¶
func RegisterShutdownV1Server(s grpc.ServiceRegistrar, srv ShutdownV1Server)
Types ¶
type ShutdownV1Client ¶
type ShutdownV1Client interface {
// ShutdownServer sends the shutdown request
Shutdown(ctx context.Context, in *definition.Empty, opts ...grpc.CallOption) (*definition.Empty, error)
}
ShutdownV1Client is the client API for ShutdownV1 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.
ShutdownV1 Service implementation
func NewShutdownV1Client ¶
func NewShutdownV1Client(cc grpc.ClientConnInterface) ShutdownV1Client
type ShutdownV1Server ¶
type ShutdownV1Server interface {
// ShutdownServer sends the shutdown request
Shutdown(context.Context, *definition.Empty) (*definition.Empty, error)
// contains filtered or unexported methods
}
ShutdownV1Server is the server API for ShutdownV1 service. All implementations must embed UnimplementedShutdownV1Server for forward compatibility.
ShutdownV1 Service implementation
type UnimplementedShutdownV1Server ¶
type UnimplementedShutdownV1Server struct{}
UnimplementedShutdownV1Server must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedShutdownV1Server) Shutdown ¶
func (UnimplementedShutdownV1Server) Shutdown(context.Context, *definition.Empty) (*definition.Empty, error)
type UnsafeShutdownV1Server ¶
type UnsafeShutdownV1Server interface {
// contains filtered or unexported methods
}
UnsafeShutdownV1Server may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ShutdownV1Server will result in compilation errors.