grpcstreamer

package
v0.0.0-...-ec279c9 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pkg_grpcstreamer_streamer_proto protoreflect.FileDescriptor
View Source
var Streamer_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Streamer",
	HandlerType: (*StreamerServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Stream",
			Handler:       _Streamer_Stream_Handler,
			ClientStreams: true,
		},
	},
	Metadata: "pkg/grpcstreamer/streamer.proto",
}

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

Functions

func RegisterStreamerServer

func RegisterStreamerServer(s grpc.ServiceRegistrar, srv StreamerServer)

Types

type Result

type Result struct {
	ReceivedCount uint32 `protobuf:"varint,1,opt,name=receivedCount,proto3" json:"receivedCount,omitempty"`
	// contains filtered or unexported fields
}

func (*Result) Descriptor deprecated

func (*Result) Descriptor() ([]byte, []int)

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetReceivedCount

func (x *Result) GetReceivedCount() uint32

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

func (x *Result) ProtoReflect() protoreflect.Message

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

type StreamerClient

type StreamerClient interface {
	Stream(ctx context.Context, opts ...grpc.CallOption) (Streamer_StreamClient, error)
}

StreamerClient is the client API for Streamer 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 NewStreamerClient

func NewStreamerClient(cc grpc.ClientConnInterface) StreamerClient

type StreamerServer

type StreamerServer interface {
	Stream(Streamer_StreamServer) error
	// contains filtered or unexported methods
}

StreamerServer is the server API for Streamer service. All implementations must embed UnimplementedStreamerServer for forward compatibility

type Streamer_StreamClient

type Streamer_StreamClient interface {
	Send(*v1.Metric) error
	CloseAndRecv() (*Result, error)
	grpc.ClientStream
}

type Streamer_StreamServer

type Streamer_StreamServer interface {
	SendAndClose(*Result) error
	Recv() (*v1.Metric, error)
	grpc.ServerStream
}

type UnimplementedStreamerServer

type UnimplementedStreamerServer struct {
}

UnimplementedStreamerServer must be embedded to have forward compatible implementations.

func (UnimplementedStreamerServer) Stream

type UnsafeStreamerServer

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

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

Jump to

Keyboard shortcuts

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