pbgrpc

package
v1.6.0-20240603104450-... Latest Latest
Warning

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

Go to latest
Published: unknown License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StreamService_GetRecords_FullMethodName = "/pb.StreamService/GetRecords"
)

Variables

View Source
var StreamService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.StreamService",
	HandlerType: (*StreamServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetRecords",
			Handler:       _StreamService_GetRecords_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "pb/test.proto",
}

StreamService_ServiceDesc is the grpc.ServiceDesc for StreamService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterStreamServiceServer

func RegisterStreamServiceServer(s grpc.ServiceRegistrar, srv StreamServiceServer)

Types

type StreamServiceClient

type StreamServiceClient interface {
	GetRecords(ctx context.Context, in *pb.Params, opts ...grpc.CallOption) (grpc.ServerStreamingClient[pb.Record], error)
}

StreamServiceClient is the client API for StreamService 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 NewStreamServiceClient

func NewStreamServiceClient(cc grpc.ClientConnInterface) StreamServiceClient

type StreamServiceServer

type StreamServiceServer interface {
	GetRecords(*pb.Params, grpc.ServerStreamingServer[pb.Record]) error
}

StreamServiceServer is the server API for StreamService service. All implementations should embed UnimplementedStreamServiceServer for forward compatibility.

type StreamService_GetRecordsClient

type StreamService_GetRecordsClient = grpc.ServerStreamingClient[pb.Record]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type StreamService_GetRecordsServer

type StreamService_GetRecordsServer = grpc.ServerStreamingServer[pb.Record]

This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.

type UnimplementedStreamServiceServer

type UnimplementedStreamServiceServer struct{}

UnimplementedStreamServiceServer should 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 (UnimplementedStreamServiceServer) GetRecords

type UnsafeStreamServiceServer

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

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

Source Files

  • test_grpc.pb.go

Jump to

Keyboard shortcuts

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