grpc

package
v0.0.0-...-0dfcff0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EchoService_Echo_FullMethodName = "/proto.EchoService/Echo"
)

Variables

View Source
var EchoService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "proto.EchoService",
	HandlerType: (*EchoServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Echo",
			Handler:    _EchoService_Echo_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "grpc_http2_protobuf/service.proto",
}

EchoService_ServiceDesc is the grpc.ServiceDesc for EchoService 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 File_grpc_http2_protobuf_service_proto protoreflect.FileDescriptor

Functions

func ExchangeFixed

func ExchangeFixed(data *data_protobuf.Data, client EchoServiceClient,
	copsD chan<- time.Duration,
	wg *sync.WaitGroup,
	b *testing.B,
)

func ExchangeQPS

func ExchangeQPS(data *data_protobuf.Data, client EchoServiceClient,
	wg *sync.WaitGroup,
	b *testing.B,
)

func MakeServer

func MakeServer() *grpc.Server

func RegisterEchoServiceServer

func RegisterEchoServiceServer(s grpc.ServiceRegistrar, srv EchoServiceServer)

func StartServer

func StartServer(l net.Listener, wg *sync.WaitGroup)

Types

type EchoServiceClient

type EchoServiceClient interface {
	Echo(ctx context.Context, in *protobuf.Data, opts ...grpc.CallOption) (*protobuf.Data, error)
}

EchoServiceClient is the client API for EchoService 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 MakeClient

func MakeClient(addr string) (EchoServiceClient, *grpc.ClientConn, error)

type EchoServiceServer

type EchoServiceServer interface {
	Echo(context.Context, *protobuf.Data) (*protobuf.Data, error)
	// contains filtered or unexported methods
}

EchoServiceServer is the server API for EchoService service. All implementations must embed UnimplementedEchoServiceServer for forward compatibility

type UnimplementedEchoServiceServer

type UnimplementedEchoServiceServer struct {
}

UnimplementedEchoServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedEchoServiceServer) Echo

type UnsafeEchoServiceServer

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

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

Jump to

Keyboard shortcuts

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