stream

package
v0.0.0-...-4b7ae9c Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StreamService_Channel_FullMethodName = "/stream.StreamService/Channel"
)

Variables

View Source
var File_stream_proto protoreflect.FileDescriptor
View Source
var StreamService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "stream.StreamService",
	HandlerType: (*StreamServiceServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Channel",
			Handler:       _StreamService_Channel_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "stream.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 Request

type Request struct {

	// int32 id = 1;
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*Request) Descriptor deprecated

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

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetId

func (x *Request) GetId() string

func (*Request) GetName

func (x *Request) GetName() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

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

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {

	// string result = 1;
	Total int32 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"`
	// contains filtered or unexported fields
}

func (*Response) Descriptor deprecated

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

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetTotal

func (x *Response) GetTotal() int32

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

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

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

type StreamServiceClient

type StreamServiceClient interface {
	Channel(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[Request, Response], 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.

type StreamServiceServer

type StreamServiceServer interface {
	Channel(grpc.BidiStreamingServer[Request, Response]) error
	// contains filtered or unexported methods
}

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

type StreamService_ChannelClient

type StreamService_ChannelClient = grpc.BidiStreamingClient[Request, Response]

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

type StreamService_ChannelServer

type StreamService_ChannelServer = grpc.BidiStreamingServer[Request, Response]

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 must 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) Channel

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.

Jump to

Keyboard shortcuts

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