Documentation
¶
Index ¶
Constants ¶
const ( Test_SendUnary_FullMethodName = "/testservice.Test/SendUnary" Test_SendStream_FullMethodName = "/testservice.Test/SendStream" )
Variables ¶
var File_testservice_proto protoreflect.FileDescriptor
var Test_ServiceDesc = grpc.ServiceDesc{ ServiceName: "testservice.Test", HandlerType: (*TestServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SendUnary", Handler: _Test_SendUnary_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "SendStream", Handler: _Test_SendStream_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "testservice.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 RegisterTestServer ¶
func RegisterTestServer(s grpc.ServiceRegistrar, srv TestServer)
Types ¶
type TestClient ¶
type TestClient interface {
// TestUnary is a fake unary RPC.
SendUnary(ctx context.Context, in *TestRequest, opts ...grpc.CallOption) (*TestResponse, error)
// TestStream is a fake streaming RPC.
SendStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[TestRequest, TestResponse], 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 {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
func (*TestRequest) Descriptor
deprecated
func (*TestRequest) Descriptor() ([]byte, []int)
Deprecated: Use TestRequest.ProtoReflect.Descriptor instead.
func (*TestRequest) GetMessage ¶
func (x *TestRequest) GetMessage() string
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 {
// contains filtered or unexported fields
}
func (*TestResponse) Descriptor
deprecated
func (*TestResponse) Descriptor() ([]byte, []int)
Deprecated: Use TestResponse.ProtoReflect.Descriptor instead.
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 {
// TestUnary is a fake unary RPC.
SendUnary(context.Context, *TestRequest) (*TestResponse, error)
// TestStream is a fake streaming RPC.
SendStream(grpc.BidiStreamingServer[TestRequest, TestResponse]) error
// contains filtered or unexported methods
}
TestServer is the server API for Test service. All implementations must embed UnimplementedTestServer for forward compatibility.
type Test_SendStreamClient ¶
type Test_SendStreamClient = grpc.BidiStreamingClient[TestRequest, TestResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type Test_SendStreamServer ¶
type Test_SendStreamServer = grpc.BidiStreamingServer[TestRequest, TestResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type UnimplementedTestServer ¶
type UnimplementedTestServer struct{}
UnimplementedTestServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedTestServer) SendStream ¶
func (UnimplementedTestServer) SendStream(grpc.BidiStreamingServer[TestRequest, TestResponse]) error
func (UnimplementedTestServer) SendUnary ¶
func (UnimplementedTestServer) SendUnary(context.Context, *TestRequest) (*TestResponse, error)
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.