Files
upstream-centrifugo/internal/proxyproto/proxy_grpc.pb.go
upstream-mirror b352a9a30d
Some checks failed
test / Lint (push) Failing after 3s
test / Test with Go 1.26.8 (push) Failing after 2s
snapshot of https://github.com/centrifugal/centrifugo.git (master, 2026-09-16; blobs > 131072B omitted)
2026-09-16 01:17:21 +05:00

616 lines
28 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.0
// - protoc v7.34.0
// source: proxy.proto
package proxyproto
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.64.0 or later.
const _ = grpc.SupportPackageIsVersion9
const (
CentrifugoProxy_Connect_FullMethodName = "/centrifugal.centrifugo.proxy.CentrifugoProxy/Connect"
CentrifugoProxy_Refresh_FullMethodName = "/centrifugal.centrifugo.proxy.CentrifugoProxy/Refresh"
CentrifugoProxy_Subscribe_FullMethodName = "/centrifugal.centrifugo.proxy.CentrifugoProxy/Subscribe"
CentrifugoProxy_Publish_FullMethodName = "/centrifugal.centrifugo.proxy.CentrifugoProxy/Publish"
CentrifugoProxy_RPC_FullMethodName = "/centrifugal.centrifugo.proxy.CentrifugoProxy/RPC"
CentrifugoProxy_SubRefresh_FullMethodName = "/centrifugal.centrifugo.proxy.CentrifugoProxy/SubRefresh"
CentrifugoProxy_SubscribeUnidirectional_FullMethodName = "/centrifugal.centrifugo.proxy.CentrifugoProxy/SubscribeUnidirectional"
CentrifugoProxy_SubscribeBidirectional_FullMethodName = "/centrifugal.centrifugo.proxy.CentrifugoProxy/SubscribeBidirectional"
CentrifugoProxy_NotifyCacheEmpty_FullMethodName = "/centrifugal.centrifugo.proxy.CentrifugoProxy/NotifyCacheEmpty"
CentrifugoProxy_NotifyChannelState_FullMethodName = "/centrifugal.centrifugo.proxy.CentrifugoProxy/NotifyChannelState"
CentrifugoProxy_MapPublish_FullMethodName = "/centrifugal.centrifugo.proxy.CentrifugoProxy/MapPublish"
CentrifugoProxy_MapRemove_FullMethodName = "/centrifugal.centrifugo.proxy.CentrifugoProxy/MapRemove"
CentrifugoProxy_SharedPollRefresh_FullMethodName = "/centrifugal.centrifugo.proxy.CentrifugoProxy/SharedPollRefresh"
)
// CentrifugoProxyClient is the client API for CentrifugoProxy 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 CentrifugoProxyClient interface {
// Connect to proxy connection authentication and communicate initial state.
Connect(ctx context.Context, in *ConnectRequest, opts ...grpc.CallOption) (*ConnectResponse, error)
// Refresh to proxy decision about connection expiration to the app backend.
Refresh(ctx context.Context, in *RefreshRequest, opts ...grpc.CallOption) (*RefreshResponse, error)
// Subscribe to proxy subscription attempts to channels.
Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (*SubscribeResponse, error)
// Publish to proxy publication attempts to channels.
Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*PublishResponse, error)
// RPC to execute custom logic on the backend over request through the real-time connection.
RPC(ctx context.Context, in *RPCRequest, opts ...grpc.CallOption) (*RPCResponse, error)
// SubRefresh to proxy decision about subscription expiration to the app backend.
SubRefresh(ctx context.Context, in *SubRefreshRequest, opts ...grpc.CallOption) (*SubRefreshResponse, error)
// SubscribeUnidirectional is an EXPERIMENTAL method which allows handling unidirectional
// subscription streams. Stream starts with SubscribeRequest similar to Subscribe rpc,
// then expects StreamSubscribeResponse with SubscribeResponse as first message, and
// StreamSubscribeResponse with Publication afterwards.
SubscribeUnidirectional(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamSubscribeResponse], error)
// SubscribeBidirectional is an EXPERIMENTAL method which allows handling bidirectional
// subscription streams. Stream receives StreamSubscribeRequest. First StreamSubscribeRequest
// always contains SubscribeRequest, then StreamSubscribeRequest will contain data published
// by client. Reverse direction works the same way as in SubscribeUnidirectional.
SubscribeBidirectional(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StreamSubscribeRequest, StreamSubscribeResponse], error)
// NotifyCacheEmpty is an EXPERIMENTAL method which allows to load documents from the backend.
NotifyCacheEmpty(ctx context.Context, in *NotifyCacheEmptyRequest, opts ...grpc.CallOption) (*NotifyCacheEmptyResponse, error)
// NotifyChannelState can be used to receive channel events such as channel "occupied" and "vacated".
// This is a feature in a preview state and is only available in Centrifugo PRO.
NotifyChannelState(ctx context.Context, in *NotifyChannelStateRequest, opts ...grpc.CallOption) (*NotifyChannelStateResponse, error)
// MapPublish to proxy map publish attempts to channels.
MapPublish(ctx context.Context, in *MapPublishRequest, opts ...grpc.CallOption) (*MapPublishResponse, error)
// MapRemove to proxy map remove attempts from channels.
MapRemove(ctx context.Context, in *MapRemoveRequest, opts ...grpc.CallOption) (*MapRemoveResponse, error)
// SharedPollRefresh to proxy shared poll refresh requests to the app backend.
SharedPollRefresh(ctx context.Context, in *SharedPollRefreshRequest, opts ...grpc.CallOption) (*SharedPollRefreshResponse, error)
}
type centrifugoProxyClient struct {
cc grpc.ClientConnInterface
}
func NewCentrifugoProxyClient(cc grpc.ClientConnInterface) CentrifugoProxyClient {
return &centrifugoProxyClient{cc}
}
func (c *centrifugoProxyClient) Connect(ctx context.Context, in *ConnectRequest, opts ...grpc.CallOption) (*ConnectResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(ConnectResponse)
err := c.cc.Invoke(ctx, CentrifugoProxy_Connect_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *centrifugoProxyClient) Refresh(ctx context.Context, in *RefreshRequest, opts ...grpc.CallOption) (*RefreshResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RefreshResponse)
err := c.cc.Invoke(ctx, CentrifugoProxy_Refresh_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *centrifugoProxyClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (*SubscribeResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SubscribeResponse)
err := c.cc.Invoke(ctx, CentrifugoProxy_Subscribe_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *centrifugoProxyClient) Publish(ctx context.Context, in *PublishRequest, opts ...grpc.CallOption) (*PublishResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(PublishResponse)
err := c.cc.Invoke(ctx, CentrifugoProxy_Publish_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *centrifugoProxyClient) RPC(ctx context.Context, in *RPCRequest, opts ...grpc.CallOption) (*RPCResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(RPCResponse)
err := c.cc.Invoke(ctx, CentrifugoProxy_RPC_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *centrifugoProxyClient) SubRefresh(ctx context.Context, in *SubRefreshRequest, opts ...grpc.CallOption) (*SubRefreshResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SubRefreshResponse)
err := c.cc.Invoke(ctx, CentrifugoProxy_SubRefresh_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *centrifugoProxyClient) SubscribeUnidirectional(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[StreamSubscribeResponse], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &CentrifugoProxy_ServiceDesc.Streams[0], CentrifugoProxy_SubscribeUnidirectional_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &grpc.GenericClientStream[SubscribeRequest, StreamSubscribeResponse]{ClientStream: stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CentrifugoProxy_SubscribeUnidirectionalClient = grpc.ServerStreamingClient[StreamSubscribeResponse]
func (c *centrifugoProxyClient) SubscribeBidirectional(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[StreamSubscribeRequest, StreamSubscribeResponse], error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
stream, err := c.cc.NewStream(ctx, &CentrifugoProxy_ServiceDesc.Streams[1], CentrifugoProxy_SubscribeBidirectional_FullMethodName, cOpts...)
if err != nil {
return nil, err
}
x := &grpc.GenericClientStream[StreamSubscribeRequest, StreamSubscribeResponse]{ClientStream: stream}
return x, nil
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CentrifugoProxy_SubscribeBidirectionalClient = grpc.BidiStreamingClient[StreamSubscribeRequest, StreamSubscribeResponse]
func (c *centrifugoProxyClient) NotifyCacheEmpty(ctx context.Context, in *NotifyCacheEmptyRequest, opts ...grpc.CallOption) (*NotifyCacheEmptyResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(NotifyCacheEmptyResponse)
err := c.cc.Invoke(ctx, CentrifugoProxy_NotifyCacheEmpty_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *centrifugoProxyClient) NotifyChannelState(ctx context.Context, in *NotifyChannelStateRequest, opts ...grpc.CallOption) (*NotifyChannelStateResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(NotifyChannelStateResponse)
err := c.cc.Invoke(ctx, CentrifugoProxy_NotifyChannelState_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *centrifugoProxyClient) MapPublish(ctx context.Context, in *MapPublishRequest, opts ...grpc.CallOption) (*MapPublishResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MapPublishResponse)
err := c.cc.Invoke(ctx, CentrifugoProxy_MapPublish_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *centrifugoProxyClient) MapRemove(ctx context.Context, in *MapRemoveRequest, opts ...grpc.CallOption) (*MapRemoveResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(MapRemoveResponse)
err := c.cc.Invoke(ctx, CentrifugoProxy_MapRemove_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *centrifugoProxyClient) SharedPollRefresh(ctx context.Context, in *SharedPollRefreshRequest, opts ...grpc.CallOption) (*SharedPollRefreshResponse, error) {
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
out := new(SharedPollRefreshResponse)
err := c.cc.Invoke(ctx, CentrifugoProxy_SharedPollRefresh_FullMethodName, in, out, cOpts...)
if err != nil {
return nil, err
}
return out, nil
}
// CentrifugoProxyServer is the server API for CentrifugoProxy service.
// All implementations must embed UnimplementedCentrifugoProxyServer
// for forward compatibility.
type CentrifugoProxyServer interface {
// Connect to proxy connection authentication and communicate initial state.
Connect(context.Context, *ConnectRequest) (*ConnectResponse, error)
// Refresh to proxy decision about connection expiration to the app backend.
Refresh(context.Context, *RefreshRequest) (*RefreshResponse, error)
// Subscribe to proxy subscription attempts to channels.
Subscribe(context.Context, *SubscribeRequest) (*SubscribeResponse, error)
// Publish to proxy publication attempts to channels.
Publish(context.Context, *PublishRequest) (*PublishResponse, error)
// RPC to execute custom logic on the backend over request through the real-time connection.
RPC(context.Context, *RPCRequest) (*RPCResponse, error)
// SubRefresh to proxy decision about subscription expiration to the app backend.
SubRefresh(context.Context, *SubRefreshRequest) (*SubRefreshResponse, error)
// SubscribeUnidirectional is an EXPERIMENTAL method which allows handling unidirectional
// subscription streams. Stream starts with SubscribeRequest similar to Subscribe rpc,
// then expects StreamSubscribeResponse with SubscribeResponse as first message, and
// StreamSubscribeResponse with Publication afterwards.
SubscribeUnidirectional(*SubscribeRequest, grpc.ServerStreamingServer[StreamSubscribeResponse]) error
// SubscribeBidirectional is an EXPERIMENTAL method which allows handling bidirectional
// subscription streams. Stream receives StreamSubscribeRequest. First StreamSubscribeRequest
// always contains SubscribeRequest, then StreamSubscribeRequest will contain data published
// by client. Reverse direction works the same way as in SubscribeUnidirectional.
SubscribeBidirectional(grpc.BidiStreamingServer[StreamSubscribeRequest, StreamSubscribeResponse]) error
// NotifyCacheEmpty is an EXPERIMENTAL method which allows to load documents from the backend.
NotifyCacheEmpty(context.Context, *NotifyCacheEmptyRequest) (*NotifyCacheEmptyResponse, error)
// NotifyChannelState can be used to receive channel events such as channel "occupied" and "vacated".
// This is a feature in a preview state and is only available in Centrifugo PRO.
NotifyChannelState(context.Context, *NotifyChannelStateRequest) (*NotifyChannelStateResponse, error)
// MapPublish to proxy map publish attempts to channels.
MapPublish(context.Context, *MapPublishRequest) (*MapPublishResponse, error)
// MapRemove to proxy map remove attempts from channels.
MapRemove(context.Context, *MapRemoveRequest) (*MapRemoveResponse, error)
// SharedPollRefresh to proxy shared poll refresh requests to the app backend.
SharedPollRefresh(context.Context, *SharedPollRefreshRequest) (*SharedPollRefreshResponse, error)
mustEmbedUnimplementedCentrifugoProxyServer()
}
// UnimplementedCentrifugoProxyServer 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.
type UnimplementedCentrifugoProxyServer struct{}
func (UnimplementedCentrifugoProxyServer) Connect(context.Context, *ConnectRequest) (*ConnectResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Connect not implemented")
}
func (UnimplementedCentrifugoProxyServer) Refresh(context.Context, *RefreshRequest) (*RefreshResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Refresh not implemented")
}
func (UnimplementedCentrifugoProxyServer) Subscribe(context.Context, *SubscribeRequest) (*SubscribeResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Subscribe not implemented")
}
func (UnimplementedCentrifugoProxyServer) Publish(context.Context, *PublishRequest) (*PublishResponse, error) {
return nil, status.Error(codes.Unimplemented, "method Publish not implemented")
}
func (UnimplementedCentrifugoProxyServer) RPC(context.Context, *RPCRequest) (*RPCResponse, error) {
return nil, status.Error(codes.Unimplemented, "method RPC not implemented")
}
func (UnimplementedCentrifugoProxyServer) SubRefresh(context.Context, *SubRefreshRequest) (*SubRefreshResponse, error) {
return nil, status.Error(codes.Unimplemented, "method SubRefresh not implemented")
}
func (UnimplementedCentrifugoProxyServer) SubscribeUnidirectional(*SubscribeRequest, grpc.ServerStreamingServer[StreamSubscribeResponse]) error {
return status.Error(codes.Unimplemented, "method SubscribeUnidirectional not implemented")
}
func (UnimplementedCentrifugoProxyServer) SubscribeBidirectional(grpc.BidiStreamingServer[StreamSubscribeRequest, StreamSubscribeResponse]) error {
return status.Error(codes.Unimplemented, "method SubscribeBidirectional not implemented")
}
func (UnimplementedCentrifugoProxyServer) NotifyCacheEmpty(context.Context, *NotifyCacheEmptyRequest) (*NotifyCacheEmptyResponse, error) {
return nil, status.Error(codes.Unimplemented, "method NotifyCacheEmpty not implemented")
}
func (UnimplementedCentrifugoProxyServer) NotifyChannelState(context.Context, *NotifyChannelStateRequest) (*NotifyChannelStateResponse, error) {
return nil, status.Error(codes.Unimplemented, "method NotifyChannelState not implemented")
}
func (UnimplementedCentrifugoProxyServer) MapPublish(context.Context, *MapPublishRequest) (*MapPublishResponse, error) {
return nil, status.Error(codes.Unimplemented, "method MapPublish not implemented")
}
func (UnimplementedCentrifugoProxyServer) MapRemove(context.Context, *MapRemoveRequest) (*MapRemoveResponse, error) {
return nil, status.Error(codes.Unimplemented, "method MapRemove not implemented")
}
func (UnimplementedCentrifugoProxyServer) SharedPollRefresh(context.Context, *SharedPollRefreshRequest) (*SharedPollRefreshResponse, error) {
return nil, status.Error(codes.Unimplemented, "method SharedPollRefresh not implemented")
}
func (UnimplementedCentrifugoProxyServer) mustEmbedUnimplementedCentrifugoProxyServer() {}
func (UnimplementedCentrifugoProxyServer) testEmbeddedByValue() {}
// UnsafeCentrifugoProxyServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to CentrifugoProxyServer will
// result in compilation errors.
type UnsafeCentrifugoProxyServer interface {
mustEmbedUnimplementedCentrifugoProxyServer()
}
func RegisterCentrifugoProxyServer(s grpc.ServiceRegistrar, srv CentrifugoProxyServer) {
// If the following call panics, it indicates UnimplementedCentrifugoProxyServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
t.testEmbeddedByValue()
}
s.RegisterService(&CentrifugoProxy_ServiceDesc, srv)
}
func _CentrifugoProxy_Connect_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ConnectRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CentrifugoProxyServer).Connect(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: CentrifugoProxy_Connect_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CentrifugoProxyServer).Connect(ctx, req.(*ConnectRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CentrifugoProxy_Refresh_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RefreshRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CentrifugoProxyServer).Refresh(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: CentrifugoProxy_Refresh_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CentrifugoProxyServer).Refresh(ctx, req.(*RefreshRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CentrifugoProxy_Subscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SubscribeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CentrifugoProxyServer).Subscribe(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: CentrifugoProxy_Subscribe_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CentrifugoProxyServer).Subscribe(ctx, req.(*SubscribeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CentrifugoProxy_Publish_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(PublishRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CentrifugoProxyServer).Publish(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: CentrifugoProxy_Publish_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CentrifugoProxyServer).Publish(ctx, req.(*PublishRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CentrifugoProxy_RPC_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RPCRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CentrifugoProxyServer).RPC(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: CentrifugoProxy_RPC_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CentrifugoProxyServer).RPC(ctx, req.(*RPCRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CentrifugoProxy_SubRefresh_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SubRefreshRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CentrifugoProxyServer).SubRefresh(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: CentrifugoProxy_SubRefresh_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CentrifugoProxyServer).SubRefresh(ctx, req.(*SubRefreshRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CentrifugoProxy_SubscribeUnidirectional_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(SubscribeRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(CentrifugoProxyServer).SubscribeUnidirectional(m, &grpc.GenericServerStream[SubscribeRequest, StreamSubscribeResponse]{ServerStream: stream})
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CentrifugoProxy_SubscribeUnidirectionalServer = grpc.ServerStreamingServer[StreamSubscribeResponse]
func _CentrifugoProxy_SubscribeBidirectional_Handler(srv interface{}, stream grpc.ServerStream) error {
return srv.(CentrifugoProxyServer).SubscribeBidirectional(&grpc.GenericServerStream[StreamSubscribeRequest, StreamSubscribeResponse]{ServerStream: stream})
}
// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type CentrifugoProxy_SubscribeBidirectionalServer = grpc.BidiStreamingServer[StreamSubscribeRequest, StreamSubscribeResponse]
func _CentrifugoProxy_NotifyCacheEmpty_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NotifyCacheEmptyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CentrifugoProxyServer).NotifyCacheEmpty(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: CentrifugoProxy_NotifyCacheEmpty_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CentrifugoProxyServer).NotifyCacheEmpty(ctx, req.(*NotifyCacheEmptyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CentrifugoProxy_NotifyChannelState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(NotifyChannelStateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CentrifugoProxyServer).NotifyChannelState(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: CentrifugoProxy_NotifyChannelState_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CentrifugoProxyServer).NotifyChannelState(ctx, req.(*NotifyChannelStateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CentrifugoProxy_MapPublish_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MapPublishRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CentrifugoProxyServer).MapPublish(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: CentrifugoProxy_MapPublish_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CentrifugoProxyServer).MapPublish(ctx, req.(*MapPublishRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CentrifugoProxy_MapRemove_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MapRemoveRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CentrifugoProxyServer).MapRemove(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: CentrifugoProxy_MapRemove_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CentrifugoProxyServer).MapRemove(ctx, req.(*MapRemoveRequest))
}
return interceptor(ctx, in, info, handler)
}
func _CentrifugoProxy_SharedPollRefresh_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SharedPollRefreshRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(CentrifugoProxyServer).SharedPollRefresh(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: CentrifugoProxy_SharedPollRefresh_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(CentrifugoProxyServer).SharedPollRefresh(ctx, req.(*SharedPollRefreshRequest))
}
return interceptor(ctx, in, info, handler)
}
// CentrifugoProxy_ServiceDesc is the grpc.ServiceDesc for CentrifugoProxy service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var CentrifugoProxy_ServiceDesc = grpc.ServiceDesc{
ServiceName: "centrifugal.centrifugo.proxy.CentrifugoProxy",
HandlerType: (*CentrifugoProxyServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Connect",
Handler: _CentrifugoProxy_Connect_Handler,
},
{
MethodName: "Refresh",
Handler: _CentrifugoProxy_Refresh_Handler,
},
{
MethodName: "Subscribe",
Handler: _CentrifugoProxy_Subscribe_Handler,
},
{
MethodName: "Publish",
Handler: _CentrifugoProxy_Publish_Handler,
},
{
MethodName: "RPC",
Handler: _CentrifugoProxy_RPC_Handler,
},
{
MethodName: "SubRefresh",
Handler: _CentrifugoProxy_SubRefresh_Handler,
},
{
MethodName: "NotifyCacheEmpty",
Handler: _CentrifugoProxy_NotifyCacheEmpty_Handler,
},
{
MethodName: "NotifyChannelState",
Handler: _CentrifugoProxy_NotifyChannelState_Handler,
},
{
MethodName: "MapPublish",
Handler: _CentrifugoProxy_MapPublish_Handler,
},
{
MethodName: "MapRemove",
Handler: _CentrifugoProxy_MapRemove_Handler,
},
{
MethodName: "SharedPollRefresh",
Handler: _CentrifugoProxy_SharedPollRefresh_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "SubscribeUnidirectional",
Handler: _CentrifugoProxy_SubscribeUnidirectional_Handler,
ServerStreams: true,
},
{
StreamName: "SubscribeBidirectional",
Handler: _CentrifugoProxy_SubscribeBidirectional_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: "proxy.proto",
}