Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterGenericServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterGenericServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GenericServiceClient) error
- func RegisterGenericServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterGenericServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GenericServiceServer) error
- func RegisterGenericServiceServer(s grpc.ServiceRegistrar, srv GenericServiceServer)
- type GenericServiceClient
- type GenericServiceServer
- type UnimplementedGenericServiceServer
- type UnsafeGenericServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_component_generic_v1_generic_proto protoreflect.FileDescriptor
var GenericService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "viam.component.generic.v1.GenericService", HandlerType: (*GenericServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "DoCommand", Handler: _GenericService_DoCommand_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "component/generic/v1/generic.proto", }
GenericService_ServiceDesc is the grpc.ServiceDesc for GenericService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterGenericServiceHandler ¶
func RegisterGenericServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterGenericServiceHandler registers the http handlers for service GenericService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterGenericServiceHandlerClient ¶
func RegisterGenericServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client GenericServiceClient) error
RegisterGenericServiceHandlerClient registers the http handlers for service GenericService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "GenericServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "GenericServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "GenericServiceClient" to call the correct interceptors.
func RegisterGenericServiceHandlerFromEndpoint ¶
func RegisterGenericServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterGenericServiceHandlerFromEndpoint is same as RegisterGenericServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterGenericServiceHandlerServer ¶
func RegisterGenericServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server GenericServiceServer) error
RegisterGenericServiceHandlerServer registers the http handlers for service GenericService to "mux". UnaryRPC :call GenericServiceServer 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 RegisterGenericServiceHandlerFromEndpoint instead.
func RegisterGenericServiceServer ¶
func RegisterGenericServiceServer(s grpc.ServiceRegistrar, srv GenericServiceServer)
Types ¶
type GenericServiceClient ¶
type GenericServiceClient interface { // DoCommand sends/recieves arbitrary commands DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error) }
GenericServiceClient is the client API for GenericService 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 NewGenericServiceClient ¶
func NewGenericServiceClient(cc grpc.ClientConnInterface) GenericServiceClient
type GenericServiceServer ¶
type GenericServiceServer interface { // DoCommand sends/recieves arbitrary commands DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error) // contains filtered or unexported methods }
GenericServiceServer is the server API for GenericService service. All implementations must embed UnimplementedGenericServiceServer for forward compatibility
type UnimplementedGenericServiceServer ¶
type UnimplementedGenericServiceServer struct { }
UnimplementedGenericServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedGenericServiceServer) DoCommand ¶
func (UnimplementedGenericServiceServer) DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error)
type UnsafeGenericServiceServer ¶
type UnsafeGenericServiceServer interface {
// contains filtered or unexported methods
}
UnsafeGenericServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to GenericServiceServer will result in compilation errors.