Documentation ¶
Overview ¶
Package grpc_wrappers_testing provides a test service that could be used for the testing gRPC wrappers
Index ¶
- Variables
- func Register(r grpc.ServiceRegistrar) *service
- func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
- type ServiceClient
- type ServiceServer
- type Service_TestStreamClient
- type Service_TestStreamServer
- type UnimplementedServiceServer
- func (UnimplementedServiceServer) TestBoolean(context.Context, *wrappers.BoolValue) (*wrappers.BoolValue, error)
- func (UnimplementedServiceServer) TestDouble(context.Context, *wrappers.DoubleValue) (*wrappers.DoubleValue, error)
- func (UnimplementedServiceServer) TestInteger(context.Context, *wrappers.Int64Value) (*wrappers.Int64Value, error)
- func (UnimplementedServiceServer) TestStream(Service_TestStreamServer) error
- func (UnimplementedServiceServer) TestString(context.Context, *wrappers.StringValue) (*wrappers.StringValue, error)
- func (UnimplementedServiceServer) TestValue(context.Context, *_struct.Value) (*_struct.Value, error)
- type UnsafeServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_test_proto protoreflect.FileDescriptor
var Service_ServiceDesc = grpc.ServiceDesc{ ServiceName: "grpc.wrappers.testing.Service", HandlerType: (*ServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "TestString", Handler: _Service_TestString_Handler, }, { MethodName: "TestInteger", Handler: _Service_TestInteger_Handler, }, { MethodName: "TestBoolean", Handler: _Service_TestBoolean_Handler, }, { MethodName: "TestDouble", Handler: _Service_TestDouble_Handler, }, { MethodName: "TestValue", Handler: _Service_TestValue_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "TestStream", Handler: _Service_TestStream_Handler, ClientStreams: true, }, }, Metadata: "test.proto", }
Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func Register ¶
func Register(r grpc.ServiceRegistrar) *service
Register registers a test service that could be used for the testing gRPC wrappers
func RegisterServiceServer ¶
func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)
Types ¶
type ServiceClient ¶
type ServiceClient interface { TestString(ctx context.Context, in *wrappers.StringValue, opts ...grpc.CallOption) (*wrappers.StringValue, error) TestInteger(ctx context.Context, in *wrappers.Int64Value, opts ...grpc.CallOption) (*wrappers.Int64Value, error) TestBoolean(ctx context.Context, in *wrappers.BoolValue, opts ...grpc.CallOption) (*wrappers.BoolValue, error) TestDouble(ctx context.Context, in *wrappers.DoubleValue, opts ...grpc.CallOption) (*wrappers.DoubleValue, error) TestValue(ctx context.Context, in *_struct.Value, opts ...grpc.CallOption) (*_struct.Value, error) TestStream(ctx context.Context, opts ...grpc.CallOption) (Service_TestStreamClient, error) }
ServiceClient is the client API for Service 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 NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶
type ServiceServer interface { TestString(context.Context, *wrappers.StringValue) (*wrappers.StringValue, error) TestInteger(context.Context, *wrappers.Int64Value) (*wrappers.Int64Value, error) TestBoolean(context.Context, *wrappers.BoolValue) (*wrappers.BoolValue, error) TestDouble(context.Context, *wrappers.DoubleValue) (*wrappers.DoubleValue, error) TestValue(context.Context, *_struct.Value) (*_struct.Value, error) TestStream(Service_TestStreamServer) error // contains filtered or unexported methods }
ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility
type Service_TestStreamClient ¶ added in v0.49.0
type Service_TestStreamClient interface { Send(*wrappers.StringValue) error CloseAndRecv() (*wrappers.StringValue, error) grpc.ClientStream }
type Service_TestStreamServer ¶ added in v0.49.0
type Service_TestStreamServer interface { SendAndClose(*wrappers.StringValue) error Recv() (*wrappers.StringValue, error) grpc.ServerStream }
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedServiceServer) TestBoolean ¶
func (UnimplementedServiceServer) TestDouble ¶
func (UnimplementedServiceServer) TestDouble(context.Context, *wrappers.DoubleValue) (*wrappers.DoubleValue, error)
func (UnimplementedServiceServer) TestInteger ¶
func (UnimplementedServiceServer) TestInteger(context.Context, *wrappers.Int64Value) (*wrappers.Int64Value, error)
func (UnimplementedServiceServer) TestStream ¶ added in v0.49.0
func (UnimplementedServiceServer) TestStream(Service_TestStreamServer) error
func (UnimplementedServiceServer) TestString ¶
func (UnimplementedServiceServer) TestString(context.Context, *wrappers.StringValue) (*wrappers.StringValue, error)
type UnsafeServiceServer ¶
type UnsafeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.