Nexus/pkg/proto/stream_grpc.pb.go

178 lines
6.8 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v5.28.2
// source: stream.proto
package proto
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// 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 StreamServiceClient interface {
CountStreamConnection(ctx context.Context, in *CountConnectionRequest, opts ...grpc.CallOption) (*CountConnectionResponse, error)
PushStream(ctx context.Context, in *PushStreamRequest, opts ...grpc.CallOption) (*PushStreamResponse, error)
PushStreamBatch(ctx context.Context, in *PushStreamBatchRequest, opts ...grpc.CallOption) (*PushStreamResponse, error)
}
type streamServiceClient struct {
cc grpc.ClientConnInterface
}
func NewStreamServiceClient(cc grpc.ClientConnInterface) StreamServiceClient {
return &streamServiceClient{cc}
}
func (c *streamServiceClient) CountStreamConnection(ctx context.Context, in *CountConnectionRequest, opts ...grpc.CallOption) (*CountConnectionResponse, error) {
out := new(CountConnectionResponse)
err := c.cc.Invoke(ctx, "/proto.StreamService/CountStreamConnection", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *streamServiceClient) PushStream(ctx context.Context, in *PushStreamRequest, opts ...grpc.CallOption) (*PushStreamResponse, error) {
out := new(PushStreamResponse)
err := c.cc.Invoke(ctx, "/proto.StreamService/PushStream", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *streamServiceClient) PushStreamBatch(ctx context.Context, in *PushStreamBatchRequest, opts ...grpc.CallOption) (*PushStreamResponse, error) {
out := new(PushStreamResponse)
err := c.cc.Invoke(ctx, "/proto.StreamService/PushStreamBatch", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// StreamServiceServer is the server API for StreamService service.
// All implementations must embed UnimplementedStreamServiceServer
// for forward compatibility
type StreamServiceServer interface {
CountStreamConnection(context.Context, *CountConnectionRequest) (*CountConnectionResponse, error)
PushStream(context.Context, *PushStreamRequest) (*PushStreamResponse, error)
PushStreamBatch(context.Context, *PushStreamBatchRequest) (*PushStreamResponse, error)
mustEmbedUnimplementedStreamServiceServer()
}
// UnimplementedStreamServiceServer must be embedded to have forward compatible implementations.
type UnimplementedStreamServiceServer struct {
}
func (UnimplementedStreamServiceServer) CountStreamConnection(context.Context, *CountConnectionRequest) (*CountConnectionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CountStreamConnection not implemented")
}
func (UnimplementedStreamServiceServer) PushStream(context.Context, *PushStreamRequest) (*PushStreamResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PushStream not implemented")
}
func (UnimplementedStreamServiceServer) PushStreamBatch(context.Context, *PushStreamBatchRequest) (*PushStreamResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method PushStreamBatch not implemented")
}
func (UnimplementedStreamServiceServer) mustEmbedUnimplementedStreamServiceServer() {}
// 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.
type UnsafeStreamServiceServer interface {
mustEmbedUnimplementedStreamServiceServer()
}
func RegisterStreamServiceServer(s grpc.ServiceRegistrar, srv StreamServiceServer) {
s.RegisterService(&StreamService_ServiceDesc, srv)
}
func _StreamService_CountStreamConnection_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CountConnectionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StreamServiceServer).CountStreamConnection(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.StreamService/CountStreamConnection",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StreamServiceServer).CountStreamConnection(ctx, req.(*CountConnectionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _StreamService_PushStream_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PushStreamRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StreamServiceServer).PushStream(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.StreamService/PushStream",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StreamServiceServer).PushStream(ctx, req.(*PushStreamRequest))
}
return interceptor(ctx, in, info, handler)
}
func _StreamService_PushStreamBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PushStreamBatchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(StreamServiceServer).PushStreamBatch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.StreamService/PushStreamBatch",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(StreamServiceServer).PushStreamBatch(ctx, req.(*PushStreamBatchRequest))
}
return interceptor(ctx, in, info, handler)
}
// 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)
var StreamService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "proto.StreamService",
HandlerType: (*StreamServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "CountStreamConnection",
Handler: _StreamService_CountStreamConnection_Handler,
},
{
MethodName: "PushStream",
Handler: _StreamService_PushStream_Handler,
},
{
MethodName: "PushStreamBatch",
Handler: _StreamService_PushStreamBatch_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "stream.proto",
}