Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterPingPongServer(s grpc.ServiceRegistrar, srv PingPongServer)
- func RegisterTestServer(s grpc.ServiceRegistrar, srv TestServer)
- type BidirectionalRequest
- func (*BidirectionalRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BidirectionalRequest) GetId() uint32
- func (*BidirectionalRequest) ProtoMessage()
- func (x *BidirectionalRequest) ProtoReflect() protoreflect.Message
- func (x *BidirectionalRequest) Reset()
- func (x *BidirectionalRequest) String() string
- type BidirectionalResponse
- func (*BidirectionalResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BidirectionalResponse) GetId() uint32
- func (*BidirectionalResponse) ProtoMessage()
- func (x *BidirectionalResponse) ProtoReflect() protoreflect.Message
- func (x *BidirectionalResponse) Reset()
- func (x *BidirectionalResponse) String() string
- type PingPongClient
- type PingPongServer
- type PingRequest
- type PongResponse
- type PrintKVRequest
- func (*PrintKVRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PrintKVRequest) GetKey() string
- func (m *PrintKVRequest) GetValue() isPrintKVRequest_Value
- func (x *PrintKVRequest) GetValueInt() int32
- func (x *PrintKVRequest) GetValueString() string
- func (*PrintKVRequest) ProtoMessage()
- func (x *PrintKVRequest) ProtoReflect() protoreflect.Message
- func (x *PrintKVRequest) Reset()
- func (x *PrintKVRequest) String() string
- type PrintKVRequest_ValueInt
- type PrintKVRequest_ValueString
- type PrintKVResponse
- type PrintStdioRequest
- func (*PrintStdioRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PrintStdioRequest) GetStderr() []byte
- func (x *PrintStdioRequest) GetStdout() []byte
- func (*PrintStdioRequest) ProtoMessage()
- func (x *PrintStdioRequest) ProtoReflect() protoreflect.Message
- func (x *PrintStdioRequest) Reset()
- func (x *PrintStdioRequest) String() string
- type TestClient
- type TestRequest
- type TestResponse
- type TestServer
- type Test_StreamClient
- type Test_StreamServer
- type UnimplementedPingPongServer
- type UnimplementedTestServer
- func (UnimplementedTestServer) Bidirectional(context.Context, *BidirectionalRequest) (*BidirectionalResponse, error)
- func (UnimplementedTestServer) Double(context.Context, *TestRequest) (*TestResponse, error)
- func (UnimplementedTestServer) PrintKV(context.Context, *PrintKVRequest) (*PrintKVResponse, error)
- func (UnimplementedTestServer) PrintStdio(context.Context, *PrintStdioRequest) (*emptypb.Empty, error)
- func (UnimplementedTestServer) Stream(Test_StreamServer) error
- type UnsafePingPongServer
- type UnsafeTestServer
Constants ¶
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" )
const (
PingPong_Ping_FullMethodName = "/grpctest.PingPong/Ping"
)
Variables ¶
var File_test_grpc_test_proto protoreflect.FileDescriptor
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)
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
func (x *PrintKVResponse) ProtoReflect() protoreflect.Message
func (*PrintKVResponse) Reset ¶
func (x *PrintKVResponse) Reset()
func (*PrintKVResponse) String ¶
func (x *PrintKVResponse) String() string
type PrintStdioRequest ¶
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
func (*PrintStdioRequest) Descriptor() ([]byte, []int)
Deprecated: Use PrintStdioRequest.ProtoReflect.Descriptor instead.
func (*PrintStdioRequest) GetStderr ¶
func (x *PrintStdioRequest) GetStderr() []byte
func (*PrintStdioRequest) GetStdout ¶
func (x *PrintStdioRequest) GetStdout() []byte
func (*PrintStdioRequest) ProtoMessage ¶
func (*PrintStdioRequest) ProtoMessage()
func (*PrintStdioRequest) ProtoReflect ¶
func (x *PrintStdioRequest) ProtoReflect() protoreflect.Message
func (*PrintStdioRequest) Reset ¶
func (x *PrintStdioRequest) Reset()
func (*PrintStdioRequest) String ¶
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 ¶
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 ¶
func (x *TestResponse) ProtoReflect() protoreflect.Message
func (*TestResponse) Reset ¶
func (x *TestResponse) Reset()
func (*TestResponse) String ¶
func (x *TestResponse) String() string
type TestServer ¶
type TestServer interface { Double(context.Context, *TestRequest) (*TestResponse, error) PrintKV(context.Context, *PrintKVRequest) (*PrintKVResponse, error) Bidirectional(context.Context, *BidirectionalRequest) (*BidirectionalResponse, error) Stream(Test_StreamServer) error PrintStdio(context.Context, *PrintStdioRequest) (*emptypb.Empty, error) }
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 ¶
type UnimplementedPingPongServer struct { }
UnimplementedPingPongServer should be embedded to have forward compatible implementations.
func (UnimplementedPingPongServer) Ping ¶
func (UnimplementedPingPongServer) Ping(context.Context, *PingRequest) (*PongResponse, error)
type UnimplementedTestServer ¶
type UnimplementedTestServer struct { }
UnimplementedTestServer should be embedded to have forward compatible implementations.
func (UnimplementedTestServer) Bidirectional ¶
func (UnimplementedTestServer) Bidirectional(context.Context, *BidirectionalRequest) (*BidirectionalResponse, error)
func (UnimplementedTestServer) Double ¶
func (UnimplementedTestServer) Double(context.Context, *TestRequest) (*TestResponse, error)
func (UnimplementedTestServer) PrintKV ¶
func (UnimplementedTestServer) PrintKV(context.Context, *PrintKVRequest) (*PrintKVResponse, error)
func (UnimplementedTestServer) PrintStdio ¶
func (UnimplementedTestServer) PrintStdio(context.Context, *PrintStdioRequest) (*emptypb.Empty, error)
func (UnimplementedTestServer) Stream ¶
func (UnimplementedTestServer) Stream(Test_StreamServer) error
type UnsafePingPongServer ¶
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 ¶
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.