2024-07-14 15:45:18 +00:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
2024-07-21 05:51:46 +00:00
// - protoc-gen-go-grpc v1.2.0
2024-07-14 15:45:18 +00:00
// - protoc v5.27.1
// 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.
2024-07-21 05:51:46 +00:00
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc . SupportPackageIsVersion7
2024-07-14 15:45:18 +00:00
// StreamControllerClient is the client API for StreamController 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 StreamControllerClient interface {
2024-07-14 15:49:34 +00:00
CountStreamConnection ( ctx context . Context , in * CountConnectionRequest , opts ... grpc . CallOption ) ( * CountConnectionResponse , error )
2024-07-14 15:45:18 +00:00
PushStream ( ctx context . Context , in * PushStreamRequest , opts ... grpc . CallOption ) ( * PushStreamResponse , error )
2024-07-17 03:58:51 +00:00
PushStreamBatch ( ctx context . Context , in * PushStreamBatchRequest , opts ... grpc . CallOption ) ( * PushStreamResponse , error )
2024-07-20 11:47:04 +00:00
EmitStreamEvent ( ctx context . Context , in * StreamEventRequest , opts ... grpc . CallOption ) ( * StreamEventResponse , error )
2024-07-14 15:45:18 +00:00
}
type streamControllerClient struct {
cc grpc . ClientConnInterface
}
func NewStreamControllerClient ( cc grpc . ClientConnInterface ) StreamControllerClient {
return & streamControllerClient { cc }
}
2024-07-14 15:49:34 +00:00
func ( c * streamControllerClient ) CountStreamConnection ( ctx context . Context , in * CountConnectionRequest , opts ... grpc . CallOption ) ( * CountConnectionResponse , error ) {
out := new ( CountConnectionResponse )
2024-07-21 05:51:46 +00:00
err := c . cc . Invoke ( ctx , "/proto.StreamController/CountStreamConnection" , in , out , opts ... )
2024-07-14 15:49:34 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2024-07-14 15:45:18 +00:00
func ( c * streamControllerClient ) PushStream ( ctx context . Context , in * PushStreamRequest , opts ... grpc . CallOption ) ( * PushStreamResponse , error ) {
out := new ( PushStreamResponse )
2024-07-21 05:51:46 +00:00
err := c . cc . Invoke ( ctx , "/proto.StreamController/PushStream" , in , out , opts ... )
2024-07-14 15:45:18 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2024-07-17 03:58:51 +00:00
func ( c * streamControllerClient ) PushStreamBatch ( ctx context . Context , in * PushStreamBatchRequest , opts ... grpc . CallOption ) ( * PushStreamResponse , error ) {
out := new ( PushStreamResponse )
2024-07-21 05:51:46 +00:00
err := c . cc . Invoke ( ctx , "/proto.StreamController/PushStreamBatch" , in , out , opts ... )
2024-07-17 03:58:51 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2024-07-20 11:47:04 +00:00
func ( c * streamControllerClient ) EmitStreamEvent ( ctx context . Context , in * StreamEventRequest , opts ... grpc . CallOption ) ( * StreamEventResponse , error ) {
out := new ( StreamEventResponse )
2024-07-21 05:51:46 +00:00
err := c . cc . Invoke ( ctx , "/proto.StreamController/EmitStreamEvent" , in , out , opts ... )
2024-07-20 11:47:04 +00:00
if err != nil {
return nil , err
}
return out , nil
}
2024-07-14 15:45:18 +00:00
// StreamControllerServer is the server API for StreamController service.
// All implementations must embed UnimplementedStreamControllerServer
// for forward compatibility
type StreamControllerServer interface {
2024-07-14 15:49:34 +00:00
CountStreamConnection ( context . Context , * CountConnectionRequest ) ( * CountConnectionResponse , error )
2024-07-14 15:45:18 +00:00
PushStream ( context . Context , * PushStreamRequest ) ( * PushStreamResponse , error )
2024-07-17 03:58:51 +00:00
PushStreamBatch ( context . Context , * PushStreamBatchRequest ) ( * PushStreamResponse , error )
2024-07-20 11:47:04 +00:00
EmitStreamEvent ( context . Context , * StreamEventRequest ) ( * StreamEventResponse , error )
2024-07-14 15:45:18 +00:00
mustEmbedUnimplementedStreamControllerServer ( )
}
// UnimplementedStreamControllerServer must be embedded to have forward compatible implementations.
type UnimplementedStreamControllerServer struct {
}
2024-07-14 15:49:34 +00:00
func ( UnimplementedStreamControllerServer ) CountStreamConnection ( context . Context , * CountConnectionRequest ) ( * CountConnectionResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method CountStreamConnection not implemented" )
}
2024-07-14 15:45:18 +00:00
func ( UnimplementedStreamControllerServer ) PushStream ( context . Context , * PushStreamRequest ) ( * PushStreamResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method PushStream not implemented" )
}
2024-07-17 03:58:51 +00:00
func ( UnimplementedStreamControllerServer ) PushStreamBatch ( context . Context , * PushStreamBatchRequest ) ( * PushStreamResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method PushStreamBatch not implemented" )
}
2024-07-20 11:47:04 +00:00
func ( UnimplementedStreamControllerServer ) EmitStreamEvent ( context . Context , * StreamEventRequest ) ( * StreamEventResponse , error ) {
return nil , status . Errorf ( codes . Unimplemented , "method EmitStreamEvent not implemented" )
}
2024-07-14 15:45:18 +00:00
func ( UnimplementedStreamControllerServer ) mustEmbedUnimplementedStreamControllerServer ( ) { }
// UnsafeStreamControllerServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to StreamControllerServer will
// result in compilation errors.
type UnsafeStreamControllerServer interface {
mustEmbedUnimplementedStreamControllerServer ( )
}
func RegisterStreamControllerServer ( s grpc . ServiceRegistrar , srv StreamControllerServer ) {
s . RegisterService ( & StreamController_ServiceDesc , srv )
}
2024-07-14 15:49:34 +00:00
func _StreamController_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 . ( StreamControllerServer ) . CountStreamConnection ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-07-21 05:51:46 +00:00
FullMethod : "/proto.StreamController/CountStreamConnection" ,
2024-07-14 15:49:34 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( StreamControllerServer ) . CountStreamConnection ( ctx , req . ( * CountConnectionRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2024-07-14 15:45:18 +00:00
func _StreamController_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 . ( StreamControllerServer ) . PushStream ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-07-21 05:51:46 +00:00
FullMethod : "/proto.StreamController/PushStream" ,
2024-07-14 15:45:18 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( StreamControllerServer ) . PushStream ( ctx , req . ( * PushStreamRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2024-07-17 03:58:51 +00:00
func _StreamController_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 . ( StreamControllerServer ) . PushStreamBatch ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-07-21 05:51:46 +00:00
FullMethod : "/proto.StreamController/PushStreamBatch" ,
2024-07-17 03:58:51 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( StreamControllerServer ) . PushStreamBatch ( ctx , req . ( * PushStreamBatchRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2024-07-20 11:47:04 +00:00
func _StreamController_EmitStreamEvent_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( StreamEventRequest )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( StreamControllerServer ) . EmitStreamEvent ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2024-07-21 05:51:46 +00:00
FullMethod : "/proto.StreamController/EmitStreamEvent" ,
2024-07-20 11:47:04 +00:00
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( StreamControllerServer ) . EmitStreamEvent ( ctx , req . ( * StreamEventRequest ) )
}
return interceptor ( ctx , in , info , handler )
}
2024-07-14 15:45:18 +00:00
// StreamController_ServiceDesc is the grpc.ServiceDesc for StreamController service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var StreamController_ServiceDesc = grpc . ServiceDesc {
ServiceName : "proto.StreamController" ,
HandlerType : ( * StreamControllerServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
2024-07-14 15:49:34 +00:00
{
MethodName : "CountStreamConnection" ,
Handler : _StreamController_CountStreamConnection_Handler ,
} ,
2024-07-14 15:45:18 +00:00
{
MethodName : "PushStream" ,
Handler : _StreamController_PushStream_Handler ,
} ,
2024-07-17 03:58:51 +00:00
{
MethodName : "PushStreamBatch" ,
Handler : _StreamController_PushStreamBatch_Handler ,
} ,
2024-07-20 11:47:04 +00:00
{
MethodName : "EmitStreamEvent" ,
Handler : _StreamController_EmitStreamEvent_Handler ,
} ,
2024-07-14 15:45:18 +00:00
} ,
Streams : [ ] grpc . StreamDesc { } ,
Metadata : "stream.proto" ,
}