v1

package
v0.1.215 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_component_posetracker_v1_pose_tracker_proto protoreflect.FileDescriptor
View Source
var PoseTrackerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "viam.component.posetracker.v1.PoseTrackerService",
	HandlerType: (*PoseTrackerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetPoses",
			Handler:    _PoseTrackerService_GetPoses_Handler,
		},
		{
			MethodName: "DoCommand",
			Handler:    _PoseTrackerService_DoCommand_Handler,
		},
		{
			MethodName: "GetGeometries",
			Handler:    _PoseTrackerService_GetGeometries_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "component/posetracker/v1/pose_tracker.proto",
}

PoseTrackerService_ServiceDesc is the grpc.ServiceDesc for PoseTrackerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterPoseTrackerServiceHandler

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

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

func RegisterPoseTrackerServiceHandlerClient

func RegisterPoseTrackerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PoseTrackerServiceClient) error

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

func RegisterPoseTrackerServiceHandlerFromEndpoint

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

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

func RegisterPoseTrackerServiceHandlerServer

func RegisterPoseTrackerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PoseTrackerServiceServer) error

RegisterPoseTrackerServiceHandlerServer registers the http handlers for service PoseTrackerService to "mux". UnaryRPC :call PoseTrackerServiceServer 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 RegisterPoseTrackerServiceHandlerFromEndpoint instead.

func RegisterPoseTrackerServiceServer

func RegisterPoseTrackerServiceServer(s grpc.ServiceRegistrar, srv PoseTrackerServiceServer)

Types

type GetPosesRequest

type GetPosesRequest struct {

	// Name of the pose tracker
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Names of the bodies whose poses are being requested. In the event
	// this parameter is not supplied or is an empty list, all available
	// poses are returned
	BodyNames []string `protobuf:"bytes,2,rep,name=body_names,json=bodyNames,proto3" json:"body_names,omitempty"`
	// Additional arguments to the method
	Extra *structpb.Struct `protobuf:"bytes,99,opt,name=extra,proto3" json:"extra,omitempty"`
	// contains filtered or unexported fields
}

func (*GetPosesRequest) Descriptor deprecated

func (*GetPosesRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetPosesRequest.ProtoReflect.Descriptor instead.

func (*GetPosesRequest) GetBodyNames

func (x *GetPosesRequest) GetBodyNames() []string

func (*GetPosesRequest) GetExtra added in v0.1.6

func (x *GetPosesRequest) GetExtra() *structpb.Struct

func (*GetPosesRequest) GetName

func (x *GetPosesRequest) GetName() string

func (*GetPosesRequest) ProtoMessage

func (*GetPosesRequest) ProtoMessage()

func (*GetPosesRequest) ProtoReflect

func (x *GetPosesRequest) ProtoReflect() protoreflect.Message

func (*GetPosesRequest) Reset

func (x *GetPosesRequest) Reset()

func (*GetPosesRequest) String

func (x *GetPosesRequest) String() string

type GetPosesResponse

type GetPosesResponse struct {

	// Mapping of each body name to the pose representing the center of the body.
	BodyPoses map[string]*v1.PoseInFrame `` /* 176-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*GetPosesResponse) Descriptor deprecated

func (*GetPosesResponse) Descriptor() ([]byte, []int)

Deprecated: Use GetPosesResponse.ProtoReflect.Descriptor instead.

func (*GetPosesResponse) GetBodyPoses

func (x *GetPosesResponse) GetBodyPoses() map[string]*v1.PoseInFrame

func (*GetPosesResponse) ProtoMessage

func (*GetPosesResponse) ProtoMessage()

func (*GetPosesResponse) ProtoReflect

func (x *GetPosesResponse) ProtoReflect() protoreflect.Message

func (*GetPosesResponse) Reset

func (x *GetPosesResponse) Reset()

func (*GetPosesResponse) String

func (x *GetPosesResponse) String() string

type PoseTrackerServiceClient

type PoseTrackerServiceClient interface {
	// GetPoses returns the current pose of each body tracked by the pose tracker
	GetPoses(ctx context.Context, in *GetPosesRequest, opts ...grpc.CallOption) (*GetPosesResponse, error)
	// DoCommand sends/receives arbitrary commands
	DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error)
	// GetGeometries returns the geometries of the component in their current configuration
	GetGeometries(ctx context.Context, in *v1.GetGeometriesRequest, opts ...grpc.CallOption) (*v1.GetGeometriesResponse, error)
}

PoseTrackerServiceClient is the client API for PoseTrackerService 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.

type PoseTrackerServiceServer

type PoseTrackerServiceServer interface {
	// GetPoses returns the current pose of each body tracked by the pose tracker
	GetPoses(context.Context, *GetPosesRequest) (*GetPosesResponse, error)
	// DoCommand sends/receives arbitrary commands
	DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error)
	// GetGeometries returns the geometries of the component in their current configuration
	GetGeometries(context.Context, *v1.GetGeometriesRequest) (*v1.GetGeometriesResponse, error)
	// contains filtered or unexported methods
}

PoseTrackerServiceServer is the server API for PoseTrackerService service. All implementations must embed UnimplementedPoseTrackerServiceServer for forward compatibility

type UnimplementedPoseTrackerServiceServer

type UnimplementedPoseTrackerServiceServer struct {
}

UnimplementedPoseTrackerServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedPoseTrackerServiceServer) DoCommand added in v0.1.79

func (UnimplementedPoseTrackerServiceServer) GetGeometries added in v0.1.129

func (UnimplementedPoseTrackerServiceServer) GetPoses

type UnsafePoseTrackerServiceServer

type UnsafePoseTrackerServiceServer interface {
	// contains filtered or unexported methods
}

UnsafePoseTrackerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PoseTrackerServiceServer will result in compilation errors.

Jump to

Keyboard shortcuts

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