v1

package
v0.1.246 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 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 DataManagerService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "viam.service.datamanager.v1.DataManagerService",
	HandlerType: (*DataManagerServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Sync",
			Handler:    _DataManagerService_Sync_Handler,
		},
		{
			MethodName: "DoCommand",
			Handler:    _DataManagerService_DoCommand_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "service/datamanager/v1/data_manager.proto",
}

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

View Source
var File_service_datamanager_v1_data_manager_proto protoreflect.FileDescriptor

Functions

func RegisterDataManagerServiceHandler

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

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

func RegisterDataManagerServiceHandlerClient

func RegisterDataManagerServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DataManagerServiceClient) error

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

func RegisterDataManagerServiceHandlerFromEndpoint

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

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

func RegisterDataManagerServiceHandlerServer

func RegisterDataManagerServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DataManagerServiceServer) error

RegisterDataManagerServiceHandlerServer registers the http handlers for service DataManagerService to "mux". UnaryRPC :call DataManagerServiceServer 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 RegisterDataManagerServiceHandlerFromEndpoint instead.

func RegisterDataManagerServiceServer

func RegisterDataManagerServiceServer(s grpc.ServiceRegistrar, srv DataManagerServiceServer)

Types

type DataManagerServiceClient

type DataManagerServiceClient interface {
	// Sync performs a sync of the non-synced files for the specified service name,
	Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error)
	// DoCommand sends/receives arbitrary commands
	DoCommand(ctx context.Context, in *v1.DoCommandRequest, opts ...grpc.CallOption) (*v1.DoCommandResponse, error)
}

DataManagerServiceClient is the client API for DataManagerService 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 DataManagerServiceServer

type DataManagerServiceServer interface {
	// Sync performs a sync of the non-synced files for the specified service name,
	Sync(context.Context, *SyncRequest) (*SyncResponse, error)
	// DoCommand sends/receives arbitrary commands
	DoCommand(context.Context, *v1.DoCommandRequest) (*v1.DoCommandResponse, error)
	// contains filtered or unexported methods
}

DataManagerServiceServer is the server API for DataManagerService service. All implementations must embed UnimplementedDataManagerServiceServer for forward compatibility

type SyncRequest

type SyncRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,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 (*SyncRequest) Descriptor deprecated

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

Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead.

func (*SyncRequest) GetExtra added in v0.1.6

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

func (*SyncRequest) GetName

func (x *SyncRequest) GetName() string

func (*SyncRequest) ProtoMessage

func (*SyncRequest) ProtoMessage()

func (*SyncRequest) ProtoReflect

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

func (*SyncRequest) Reset

func (x *SyncRequest) Reset()

func (*SyncRequest) String

func (x *SyncRequest) String() string

type SyncResponse

type SyncResponse struct {
	// contains filtered or unexported fields
}

func (*SyncResponse) Descriptor deprecated

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

Deprecated: Use SyncResponse.ProtoReflect.Descriptor instead.

func (*SyncResponse) ProtoMessage

func (*SyncResponse) ProtoMessage()

func (*SyncResponse) ProtoReflect

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

func (*SyncResponse) Reset

func (x *SyncResponse) Reset()

func (*SyncResponse) String

func (x *SyncResponse) String() string

type UnimplementedDataManagerServiceServer

type UnimplementedDataManagerServiceServer struct {
}

UnimplementedDataManagerServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedDataManagerServiceServer) DoCommand added in v0.1.80

func (UnimplementedDataManagerServiceServer) Sync

type UnsafeDataManagerServiceServer

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

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

Jump to

Keyboard shortcuts

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