grpc_wrappers_testing

package
v0.0.0-...-deba56b Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Overview

Package grpc_wrappers_testing contains the test service that helps to test gRPC wrappers.

Index

Constants

This section is empty.

Variables

View Source
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,
		},
	},
	Streams:  []grpc.StreamDesc{},
	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)
}

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)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) TestBoolean

func (UnimplementedServiceServer) TestDouble

func (UnimplementedServiceServer) TestInteger

func (UnimplementedServiceServer) TestString

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.

Jump to

Keyboard shortcuts

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