grpctest

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Test_Double_FullMethodName        = "/grpctest.Test/Double"
	Test_PrintKV_FullMethodName       = "/grpctest.Test/PrintKV"
	Test_Bidirectional_FullMethodName = "/grpctest.Test/Bidirectional"
	Test_Stream_FullMethodName        = "/grpctest.Test/Stream"
	Test_PrintStdio_FullMethodName    = "/grpctest.Test/PrintStdio"
)
View Source
const (
	PingPong_Ping_FullMethodName = "/grpctest.PingPong/Ping"
)

Variables

View Source
var File_test_grpc_test_proto protoreflect.FileDescriptor
View Source
var PingPong_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "grpctest.PingPong",
	HandlerType: (*PingPongServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Ping",
			Handler:    _PingPong_Ping_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "test/grpc/test.proto",
}

PingPong_ServiceDesc is the grpc.ServiceDesc for PingPong 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 Test_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "grpctest.Test",
	HandlerType: (*TestServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Double",
			Handler:    _Test_Double_Handler,
		},
		{
			MethodName: "PrintKV",
			Handler:    _Test_PrintKV_Handler,
		},
		{
			MethodName: "Bidirectional",
			Handler:    _Test_Bidirectional_Handler,
		},
		{
			MethodName: "PrintStdio",
			Handler:    _Test_PrintStdio_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Stream",
			Handler:       _Test_Stream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "test/grpc/test.proto",
}

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

Functions

func RegisterPingPongServer

func RegisterPingPongServer(s grpc.ServiceRegistrar, srv PingPongServer)

func RegisterTestServer

func RegisterTestServer(s grpc.ServiceRegistrar, srv TestServer)

Types

type BidirectionalRequest

type BidirectionalRequest struct {
	Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*BidirectionalRequest) Descriptor deprecated

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

Deprecated: Use BidirectionalRequest.ProtoReflect.Descriptor instead.

func (*BidirectionalRequest) GetId

func (x *BidirectionalRequest) GetId() uint32

func (*BidirectionalRequest) ProtoMessage

func (*BidirectionalRequest) ProtoMessage()

func (*BidirectionalRequest) ProtoReflect added in v1.6.0

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

func (*BidirectionalRequest) Reset

func (x *BidirectionalRequest) Reset()

func (*BidirectionalRequest) String

func (x *BidirectionalRequest) String() string

type BidirectionalResponse

type BidirectionalResponse struct {
	Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*BidirectionalResponse) Descriptor deprecated

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

Deprecated: Use BidirectionalResponse.ProtoReflect.Descriptor instead.

func (*BidirectionalResponse) GetId

func (x *BidirectionalResponse) GetId() uint32

func (*BidirectionalResponse) ProtoMessage

func (*BidirectionalResponse) ProtoMessage()

func (*BidirectionalResponse) ProtoReflect added in v1.6.0

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

func (*BidirectionalResponse) Reset

func (x *BidirectionalResponse) Reset()

func (*BidirectionalResponse) String

func (x *BidirectionalResponse) String() string

type PingPongClient

type PingPongClient interface {
	Ping(ctx context.Context, in *PingRequest, opts ...grpc.CallOption) (*PongResponse, error)
}

PingPongClient is the client API for PingPong 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 NewPingPongClient

func NewPingPongClient(cc grpc.ClientConnInterface) PingPongClient

type PingPongServer

type PingPongServer interface {
	Ping(context.Context, *PingRequest) (*PongResponse, error)
}

PingPongServer is the server API for PingPong service. All implementations should embed UnimplementedPingPongServer for forward compatibility

type PingRequest

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

func (*PingRequest) Descriptor deprecated

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

Deprecated: Use PingRequest.ProtoReflect.Descriptor instead.

func (*PingRequest) ProtoMessage

func (*PingRequest) ProtoMessage()

func (*PingRequest) ProtoReflect added in v1.6.0

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

func (*PingRequest) Reset

func (x *PingRequest) Reset()

func (*PingRequest) String

func (x *PingRequest) String() string

type PongResponse

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

func (*PongResponse) Descriptor deprecated

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

Deprecated: Use PongResponse.ProtoReflect.Descriptor instead.

func (*PongResponse) GetMsg

func (x *PongResponse) GetMsg() string

func (*PongResponse) ProtoMessage

func (*PongResponse) ProtoMessage()

func (*PongResponse) ProtoReflect added in v1.6.0

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

func (*PongResponse) Reset

func (x *PongResponse) Reset()

func (*PongResponse) String

func (x *PongResponse) String() string

type PrintKVRequest

type PrintKVRequest struct {
	Key string `protobuf:"bytes,1,opt,name=Key,proto3" json:"Key,omitempty"`
	// Types that are assignable to Value:
	//
	//	*PrintKVRequest_ValueString
	//	*PrintKVRequest_ValueInt
	Value isPrintKVRequest_Value `protobuf_oneof:"Value"`
	// contains filtered or unexported fields
}

func (*PrintKVRequest) Descriptor deprecated

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

Deprecated: Use PrintKVRequest.ProtoReflect.Descriptor instead.

func (*PrintKVRequest) GetKey

func (x *PrintKVRequest) GetKey() string

func (*PrintKVRequest) GetValue

func (m *PrintKVRequest) GetValue() isPrintKVRequest_Value

func (*PrintKVRequest) GetValueInt

func (x *PrintKVRequest) GetValueInt() int32

func (*PrintKVRequest) GetValueString

func (x *PrintKVRequest) GetValueString() string

func (*PrintKVRequest) ProtoMessage

func (*PrintKVRequest) ProtoMessage()

func (*PrintKVRequest) ProtoReflect added in v1.6.0

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

func (*PrintKVRequest) Reset

func (x *PrintKVRequest) Reset()

func (*PrintKVRequest) String

func (x *PrintKVRequest) String() string

type PrintKVRequest_ValueInt

type PrintKVRequest_ValueInt struct {
	ValueInt int32 `protobuf:"varint,3,opt,name=ValueInt,proto3,oneof"`
}

type PrintKVRequest_ValueString

type PrintKVRequest_ValueString struct {
	ValueString string `protobuf:"bytes,2,opt,name=ValueString,proto3,oneof"`
}

type PrintKVResponse

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

func (*PrintKVResponse) Descriptor deprecated

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

Deprecated: Use PrintKVResponse.ProtoReflect.Descriptor instead.

func (*PrintKVResponse) ProtoMessage

func (*PrintKVResponse) ProtoMessage()

func (*PrintKVResponse) ProtoReflect added in v1.6.0

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

func (*PrintKVResponse) Reset

func (x *PrintKVResponse) Reset()

func (*PrintKVResponse) String

func (x *PrintKVResponse) String() string

type PrintStdioRequest added in v1.1.0

type PrintStdioRequest struct {
	Stdout []byte `protobuf:"bytes,1,opt,name=stdout,proto3" json:"stdout,omitempty"`
	Stderr []byte `protobuf:"bytes,2,opt,name=stderr,proto3" json:"stderr,omitempty"`
	// contains filtered or unexported fields
}

func (*PrintStdioRequest) Descriptor deprecated added in v1.1.0

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

Deprecated: Use PrintStdioRequest.ProtoReflect.Descriptor instead.

func (*PrintStdioRequest) GetStderr added in v1.1.0

func (x *PrintStdioRequest) GetStderr() []byte

func (*PrintStdioRequest) GetStdout added in v1.1.0

func (x *PrintStdioRequest) GetStdout() []byte

func (*PrintStdioRequest) ProtoMessage added in v1.1.0

func (*PrintStdioRequest) ProtoMessage()

func (*PrintStdioRequest) ProtoReflect added in v1.6.0

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

func (*PrintStdioRequest) Reset added in v1.1.0

func (x *PrintStdioRequest) Reset()

func (*PrintStdioRequest) String added in v1.1.0

func (x *PrintStdioRequest) String() string

type TestClient

type TestClient interface {
	Double(ctx context.Context, in *TestRequest, opts ...grpc.CallOption) (*TestResponse, error)
	PrintKV(ctx context.Context, in *PrintKVRequest, opts ...grpc.CallOption) (*PrintKVResponse, error)
	Bidirectional(ctx context.Context, in *BidirectionalRequest, opts ...grpc.CallOption) (*BidirectionalResponse, error)
	Stream(ctx context.Context, opts ...grpc.CallOption) (Test_StreamClient, error)
	PrintStdio(ctx context.Context, in *PrintStdioRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}

TestClient is the client API for Test 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 NewTestClient

func NewTestClient(cc grpc.ClientConnInterface) TestClient

type TestRequest

type TestRequest struct {
	Input int32 `protobuf:"varint,1,opt,name=Input,proto3" json:"Input,omitempty"`
	// contains filtered or unexported fields
}

func (*TestRequest) Descriptor deprecated

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

Deprecated: Use TestRequest.ProtoReflect.Descriptor instead.

func (*TestRequest) GetInput

func (x *TestRequest) GetInput() int32

func (*TestRequest) ProtoMessage

func (*TestRequest) ProtoMessage()

func (*TestRequest) ProtoReflect added in v1.6.0

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

func (*TestRequest) Reset

func (x *TestRequest) Reset()

func (*TestRequest) String

func (x *TestRequest) String() string

type TestResponse

type TestResponse struct {
	Output int32 `protobuf:"varint,2,opt,name=Output,proto3" json:"Output,omitempty"`
	// contains filtered or unexported fields
}

func (*TestResponse) Descriptor deprecated

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

Deprecated: Use TestResponse.ProtoReflect.Descriptor instead.

func (*TestResponse) GetOutput

func (x *TestResponse) GetOutput() int32

func (*TestResponse) ProtoMessage

func (*TestResponse) ProtoMessage()

func (*TestResponse) ProtoReflect added in v1.6.0

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

func (*TestResponse) Reset

func (x *TestResponse) Reset()

func (*TestResponse) String

func (x *TestResponse) String() string

type TestServer

TestServer is the server API for Test service. All implementations should embed UnimplementedTestServer for forward compatibility

type Test_StreamClient

type Test_StreamClient interface {
	Send(*TestRequest) error
	Recv() (*TestResponse, error)
	grpc.ClientStream
}

type Test_StreamServer

type Test_StreamServer interface {
	Send(*TestResponse) error
	Recv() (*TestRequest, error)
	grpc.ServerStream
}

type UnimplementedPingPongServer added in v1.6.0

type UnimplementedPingPongServer struct {
}

UnimplementedPingPongServer should be embedded to have forward compatible implementations.

func (UnimplementedPingPongServer) Ping added in v1.6.0

type UnimplementedTestServer added in v1.6.0

type UnimplementedTestServer struct {
}

UnimplementedTestServer should be embedded to have forward compatible implementations.

func (UnimplementedTestServer) Bidirectional added in v1.6.0

func (UnimplementedTestServer) Double added in v1.6.0

func (UnimplementedTestServer) PrintKV added in v1.6.0

func (UnimplementedTestServer) PrintStdio added in v1.6.0

func (UnimplementedTestServer) Stream added in v1.6.0

type UnsafePingPongServer added in v1.6.0

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

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

type UnsafeTestServer added in v1.6.0

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

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

Jump to

Keyboard shortcuts

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