v1

package
v0.1.185 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

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_testecho_v1_testecho_proto protoreflect.FileDescriptor
View Source
var TestEchoService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "viam.component.testecho.v1.TestEchoService",
	HandlerType: (*TestEchoServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Echo",
			Handler:    _TestEchoService_Echo_Handler,
		},
		{
			MethodName: "Stop",
			Handler:    _TestEchoService_Stop_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "EchoMultiple",
			Handler:       _TestEchoService_EchoMultiple_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "EchoBiDi",
			Handler:       _TestEchoService_EchoBiDi_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "component/testecho/v1/testecho.proto",
}

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

Functions

func RegisterTestEchoServiceHandler

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

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

func RegisterTestEchoServiceHandlerClient

func RegisterTestEchoServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TestEchoServiceClient) error

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

func RegisterTestEchoServiceHandlerFromEndpoint

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

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

func RegisterTestEchoServiceHandlerServer

func RegisterTestEchoServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TestEchoServiceServer) error

RegisterTestEchoServiceHandlerServer registers the http handlers for service TestEchoService to "mux". UnaryRPC :call TestEchoServiceServer 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 RegisterTestEchoServiceHandlerFromEndpoint instead.

func RegisterTestEchoServiceServer

func RegisterTestEchoServiceServer(s grpc.ServiceRegistrar, srv TestEchoServiceServer)

Types

type EchoBiDiRequest

type EchoBiDiRequest struct {
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*EchoBiDiRequest) Descriptor deprecated

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

Deprecated: Use EchoBiDiRequest.ProtoReflect.Descriptor instead.

func (*EchoBiDiRequest) GetMessage

func (x *EchoBiDiRequest) GetMessage() string

func (*EchoBiDiRequest) GetName

func (x *EchoBiDiRequest) GetName() string

func (*EchoBiDiRequest) ProtoMessage

func (*EchoBiDiRequest) ProtoMessage()

func (*EchoBiDiRequest) ProtoReflect

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

func (*EchoBiDiRequest) Reset

func (x *EchoBiDiRequest) Reset()

func (*EchoBiDiRequest) String

func (x *EchoBiDiRequest) String() string

type EchoBiDiResponse

type EchoBiDiResponse struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*EchoBiDiResponse) Descriptor deprecated

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

Deprecated: Use EchoBiDiResponse.ProtoReflect.Descriptor instead.

func (*EchoBiDiResponse) GetMessage

func (x *EchoBiDiResponse) GetMessage() string

func (*EchoBiDiResponse) ProtoMessage

func (*EchoBiDiResponse) ProtoMessage()

func (*EchoBiDiResponse) ProtoReflect

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

func (*EchoBiDiResponse) Reset

func (x *EchoBiDiResponse) Reset()

func (*EchoBiDiResponse) String

func (x *EchoBiDiResponse) String() string

type EchoMultipleRequest

type EchoMultipleRequest struct {
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*EchoMultipleRequest) Descriptor deprecated

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

Deprecated: Use EchoMultipleRequest.ProtoReflect.Descriptor instead.

func (*EchoMultipleRequest) GetMessage

func (x *EchoMultipleRequest) GetMessage() string

func (*EchoMultipleRequest) GetName

func (x *EchoMultipleRequest) GetName() string

func (*EchoMultipleRequest) ProtoMessage

func (*EchoMultipleRequest) ProtoMessage()

func (*EchoMultipleRequest) ProtoReflect

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

func (*EchoMultipleRequest) Reset

func (x *EchoMultipleRequest) Reset()

func (*EchoMultipleRequest) String

func (x *EchoMultipleRequest) String() string

type EchoMultipleResponse

type EchoMultipleResponse struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*EchoMultipleResponse) Descriptor deprecated

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

Deprecated: Use EchoMultipleResponse.ProtoReflect.Descriptor instead.

func (*EchoMultipleResponse) GetMessage

func (x *EchoMultipleResponse) GetMessage() string

func (*EchoMultipleResponse) ProtoMessage

func (*EchoMultipleResponse) ProtoMessage()

func (*EchoMultipleResponse) ProtoReflect

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

func (*EchoMultipleResponse) Reset

func (x *EchoMultipleResponse) Reset()

func (*EchoMultipleResponse) String

func (x *EchoMultipleResponse) String() string

type EchoRequest

type EchoRequest struct {
	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*EchoRequest) Descriptor deprecated

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

Deprecated: Use EchoRequest.ProtoReflect.Descriptor instead.

func (*EchoRequest) GetMessage

func (x *EchoRequest) GetMessage() string

func (*EchoRequest) GetName

func (x *EchoRequest) GetName() string

func (*EchoRequest) ProtoMessage

func (*EchoRequest) ProtoMessage()

func (*EchoRequest) ProtoReflect

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

func (*EchoRequest) Reset

func (x *EchoRequest) Reset()

func (*EchoRequest) String

func (x *EchoRequest) String() string

type EchoResponse

type EchoResponse struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*EchoResponse) Descriptor deprecated

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

Deprecated: Use EchoResponse.ProtoReflect.Descriptor instead.

func (*EchoResponse) GetMessage

func (x *EchoResponse) GetMessage() string

func (*EchoResponse) ProtoMessage

func (*EchoResponse) ProtoMessage()

func (*EchoResponse) ProtoReflect

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

func (*EchoResponse) Reset

func (x *EchoResponse) Reset()

func (*EchoResponse) String

func (x *EchoResponse) String() string

type StopRequest added in v0.1.18

type StopRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*StopRequest) Descriptor deprecated added in v0.1.18

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

Deprecated: Use StopRequest.ProtoReflect.Descriptor instead.

func (*StopRequest) GetName added in v0.1.18

func (x *StopRequest) GetName() string

func (*StopRequest) ProtoMessage added in v0.1.18

func (*StopRequest) ProtoMessage()

func (*StopRequest) ProtoReflect added in v0.1.18

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

func (*StopRequest) Reset added in v0.1.18

func (x *StopRequest) Reset()

func (*StopRequest) String added in v0.1.18

func (x *StopRequest) String() string

type StopResponse added in v0.1.18

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

func (*StopResponse) Descriptor deprecated added in v0.1.18

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

Deprecated: Use StopResponse.ProtoReflect.Descriptor instead.

func (*StopResponse) ProtoMessage added in v0.1.18

func (*StopResponse) ProtoMessage()

func (*StopResponse) ProtoReflect added in v0.1.18

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

func (*StopResponse) Reset added in v0.1.18

func (x *StopResponse) Reset()

func (*StopResponse) String added in v0.1.18

func (x *StopResponse) String() string

type TestEchoServiceClient

type TestEchoServiceClient interface {
	Echo(ctx context.Context, in *EchoRequest, opts ...grpc.CallOption) (*EchoResponse, error)
	EchoMultiple(ctx context.Context, in *EchoMultipleRequest, opts ...grpc.CallOption) (TestEchoService_EchoMultipleClient, error)
	EchoBiDi(ctx context.Context, opts ...grpc.CallOption) (TestEchoService_EchoBiDiClient, error)
	Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error)
}

TestEchoServiceClient is the client API for TestEchoService 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 TestEchoServiceServer

type TestEchoServiceServer interface {
	Echo(context.Context, *EchoRequest) (*EchoResponse, error)
	EchoMultiple(*EchoMultipleRequest, TestEchoService_EchoMultipleServer) error
	EchoBiDi(TestEchoService_EchoBiDiServer) error
	Stop(context.Context, *StopRequest) (*StopResponse, error)
	// contains filtered or unexported methods
}

TestEchoServiceServer is the server API for TestEchoService service. All implementations must embed UnimplementedTestEchoServiceServer for forward compatibility

type TestEchoService_EchoBiDiClient

type TestEchoService_EchoBiDiClient interface {
	Send(*EchoBiDiRequest) error
	Recv() (*EchoBiDiResponse, error)
	grpc.ClientStream
}

type TestEchoService_EchoBiDiServer

type TestEchoService_EchoBiDiServer interface {
	Send(*EchoBiDiResponse) error
	Recv() (*EchoBiDiRequest, error)
	grpc.ServerStream
}

type TestEchoService_EchoMultipleClient

type TestEchoService_EchoMultipleClient interface {
	Recv() (*EchoMultipleResponse, error)
	grpc.ClientStream
}

type TestEchoService_EchoMultipleServer

type TestEchoService_EchoMultipleServer interface {
	Send(*EchoMultipleResponse) error
	grpc.ServerStream
}

type UnimplementedTestEchoServiceServer

type UnimplementedTestEchoServiceServer struct {
}

UnimplementedTestEchoServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedTestEchoServiceServer) Echo

func (UnimplementedTestEchoServiceServer) EchoBiDi

func (UnimplementedTestEchoServiceServer) EchoMultiple

func (UnimplementedTestEchoServiceServer) Stop added in v0.1.18

type UnsafeTestEchoServiceServer

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

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

Jump to

Keyboard shortcuts

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