unistream

package
v5.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CentrifugoUniStream_Consume_FullMethodName = "/centrifugal.centrifugo.unistream.CentrifugoUniStream/Consume"
)

Variables

View Source
var CentrifugoUniStream_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "centrifugal.centrifugo.unistream.CentrifugoUniStream",
	HandlerType: (*CentrifugoUniStreamServer)(nil),
	Methods:     []grpc.MethodDesc{},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Consume",
			Handler:       _CentrifugoUniStream_Consume_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "unistream.proto",
}

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

View Source
var File_unistream_proto protoreflect.FileDescriptor

Functions

func RegisterCentrifugoUniStreamServer

func RegisterCentrifugoUniStreamServer(s grpc.ServiceRegistrar, srv CentrifugoUniStreamServer)

Types

type CentrifugoUniStreamClient

type CentrifugoUniStreamClient interface {
	Consume(ctx context.Context, in *ConnectRequest, opts ...grpc.CallOption) (CentrifugoUniStream_ConsumeClient, error)
}

CentrifugoUniStreamClient is the client API for CentrifugoUniStream 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 CentrifugoUniStreamServer

type CentrifugoUniStreamServer interface {
	Consume(*ConnectRequest, CentrifugoUniStream_ConsumeServer) error
	// contains filtered or unexported methods
}

CentrifugoUniStreamServer is the server API for CentrifugoUniStream service. All implementations must embed UnimplementedCentrifugoUniStreamServer for forward compatibility

type CentrifugoUniStream_ConsumeClient

type CentrifugoUniStream_ConsumeClient interface {
	Recv() (*Push, error)
	grpc.ClientStream
}

type CentrifugoUniStream_ConsumeServer

type CentrifugoUniStream_ConsumeServer interface {
	Send(*Push) error
	grpc.ServerStream
}

type ClientInfo

type ClientInfo struct {
	User     string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	Client   string `protobuf:"bytes,2,opt,name=client,proto3" json:"client,omitempty"`
	ConnInfo []byte `protobuf:"bytes,3,opt,name=conn_info,json=connInfo,proto3" json:"conn_info,omitempty"`
	ChanInfo []byte `protobuf:"bytes,4,opt,name=chan_info,json=chanInfo,proto3" json:"chan_info,omitempty"`
	// contains filtered or unexported fields
}

func (*ClientInfo) Descriptor deprecated

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

Deprecated: Use ClientInfo.ProtoReflect.Descriptor instead.

func (*ClientInfo) GetChanInfo

func (x *ClientInfo) GetChanInfo() []byte

func (*ClientInfo) GetClient

func (x *ClientInfo) GetClient() string

func (*ClientInfo) GetConnInfo

func (x *ClientInfo) GetConnInfo() []byte

func (*ClientInfo) GetUser

func (x *ClientInfo) GetUser() string

func (*ClientInfo) ProtoMessage

func (*ClientInfo) ProtoMessage()

func (*ClientInfo) ProtoReflect

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

func (*ClientInfo) Reset

func (x *ClientInfo) Reset()

func (*ClientInfo) String

func (x *ClientInfo) String() string

type Connect

type Connect struct {
	Client  string                      `protobuf:"bytes,1,opt,name=client,proto3" json:"client,omitempty"`
	Version string                      `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	Data    []byte                      `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	Subs    map[string]*SubscribeResult `` /* 149-byte string literal not displayed */
	Expires bool                        `protobuf:"varint,5,opt,name=expires,proto3" json:"expires,omitempty"`
	Ttl     uint32                      `protobuf:"varint,6,opt,name=ttl,proto3" json:"ttl,omitempty"`
	Ping    uint32                      `protobuf:"varint,7,opt,name=ping,proto3" json:"ping,omitempty"`
	Pong    bool                        `protobuf:"varint,8,opt,name=pong,proto3" json:"pong,omitempty"`
	Session string                      `protobuf:"bytes,9,opt,name=session,proto3" json:"session,omitempty"`
	Node    string                      `protobuf:"bytes,10,opt,name=node,proto3" json:"node,omitempty"`
	// contains filtered or unexported fields
}

func (*Connect) Descriptor deprecated

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

Deprecated: Use Connect.ProtoReflect.Descriptor instead.

func (*Connect) GetClient

func (x *Connect) GetClient() string

func (*Connect) GetData

func (x *Connect) GetData() []byte

func (*Connect) GetExpires

func (x *Connect) GetExpires() bool

func (*Connect) GetNode

func (x *Connect) GetNode() string

func (*Connect) GetPing

func (x *Connect) GetPing() uint32

func (*Connect) GetPong

func (x *Connect) GetPong() bool

func (*Connect) GetSession

func (x *Connect) GetSession() string

func (*Connect) GetSubs

func (x *Connect) GetSubs() map[string]*SubscribeResult

func (*Connect) GetTtl

func (x *Connect) GetTtl() uint32

func (*Connect) GetVersion

func (x *Connect) GetVersion() string

func (*Connect) ProtoMessage

func (*Connect) ProtoMessage()

func (*Connect) ProtoReflect

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

func (*Connect) Reset

func (x *Connect) Reset()

func (*Connect) String

func (x *Connect) String() string

type ConnectRequest

type ConnectRequest struct {

	// Numeration is in sync with Centrifuge client protocol.
	Token   string                       `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Data    []byte                       `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	Subs    map[string]*SubscribeRequest `` /* 149-byte string literal not displayed */
	Name    string                       `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	Version string                       `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*ConnectRequest) Descriptor deprecated

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

Deprecated: Use ConnectRequest.ProtoReflect.Descriptor instead.

func (*ConnectRequest) GetData

func (x *ConnectRequest) GetData() []byte

func (*ConnectRequest) GetName

func (x *ConnectRequest) GetName() string

func (*ConnectRequest) GetSubs

func (x *ConnectRequest) GetSubs() map[string]*SubscribeRequest

func (*ConnectRequest) GetToken

func (x *ConnectRequest) GetToken() string

func (*ConnectRequest) GetVersion

func (x *ConnectRequest) GetVersion() string

func (*ConnectRequest) ProtoMessage

func (*ConnectRequest) ProtoMessage()

func (*ConnectRequest) ProtoReflect

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

func (*ConnectRequest) Reset

func (x *ConnectRequest) Reset()

func (*ConnectRequest) String

func (x *ConnectRequest) String() string

type Disconnect

type Disconnect struct {
	Code      uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Reason    string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
	Reconnect bool   `protobuf:"varint,3,opt,name=reconnect,proto3" json:"reconnect,omitempty"`
	// contains filtered or unexported fields
}

func (*Disconnect) Descriptor deprecated

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

Deprecated: Use Disconnect.ProtoReflect.Descriptor instead.

func (*Disconnect) GetCode

func (x *Disconnect) GetCode() uint32

func (*Disconnect) GetReason

func (x *Disconnect) GetReason() string

func (*Disconnect) GetReconnect

func (x *Disconnect) GetReconnect() bool

func (*Disconnect) ProtoMessage

func (*Disconnect) ProtoMessage()

func (*Disconnect) ProtoReflect

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

func (*Disconnect) Reset

func (x *Disconnect) Reset()

func (*Disconnect) String

func (x *Disconnect) String() string

type Join

type Join struct {
	Info *ClientInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	// contains filtered or unexported fields
}

func (*Join) Descriptor deprecated

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

Deprecated: Use Join.ProtoReflect.Descriptor instead.

func (*Join) GetInfo

func (x *Join) GetInfo() *ClientInfo

func (*Join) ProtoMessage

func (*Join) ProtoMessage()

func (*Join) ProtoReflect

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

func (*Join) Reset

func (x *Join) Reset()

func (*Join) String

func (x *Join) String() string

type Leave

type Leave struct {
	Info *ClientInfo `protobuf:"bytes,1,opt,name=info,proto3" json:"info,omitempty"`
	// contains filtered or unexported fields
}

func (*Leave) Descriptor deprecated

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

Deprecated: Use Leave.ProtoReflect.Descriptor instead.

func (*Leave) GetInfo

func (x *Leave) GetInfo() *ClientInfo

func (*Leave) ProtoMessage

func (*Leave) ProtoMessage()

func (*Leave) ProtoReflect

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

func (*Leave) Reset

func (x *Leave) Reset()

func (*Leave) String

func (x *Leave) String() string

type Message

type Message struct {
	Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetData

func (x *Message) GetData() []byte

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type Publication

type Publication struct {
	Data   []byte            `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`
	Info   *ClientInfo       `protobuf:"bytes,5,opt,name=info,proto3" json:"info,omitempty"`
	Offset uint64            `protobuf:"varint,6,opt,name=offset,proto3" json:"offset,omitempty"`
	Tags   map[string]string `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*Publication) Descriptor deprecated

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

Deprecated: Use Publication.ProtoReflect.Descriptor instead.

func (*Publication) GetData

func (x *Publication) GetData() []byte

func (*Publication) GetInfo

func (x *Publication) GetInfo() *ClientInfo

func (*Publication) GetOffset

func (x *Publication) GetOffset() uint64

func (*Publication) GetTags

func (x *Publication) GetTags() map[string]string

func (*Publication) ProtoMessage

func (*Publication) ProtoMessage()

func (*Publication) ProtoReflect

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

func (*Publication) Reset

func (x *Publication) Reset()

func (*Publication) String

func (x *Publication) String() string

type Push

type Push struct {
	Channel string `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty"`
	// ProtocolVersion2 server can push one of the following fields to the client. We are
	// not using oneof here due to JSON interoperability concerns.
	Pub         *Publication `protobuf:"bytes,4,opt,name=pub,proto3" json:"pub,omitempty"`
	Join        *Join        `protobuf:"bytes,5,opt,name=join,proto3" json:"join,omitempty"`
	Leave       *Leave       `protobuf:"bytes,6,opt,name=leave,proto3" json:"leave,omitempty"`
	Unsubscribe *Unsubscribe `protobuf:"bytes,7,opt,name=unsubscribe,proto3" json:"unsubscribe,omitempty"`
	Message     *Message     `protobuf:"bytes,8,opt,name=message,proto3" json:"message,omitempty"`
	Subscribe   *Subscribe   `protobuf:"bytes,9,opt,name=subscribe,proto3" json:"subscribe,omitempty"`
	Connect     *Connect     `protobuf:"bytes,10,opt,name=connect,proto3" json:"connect,omitempty"`
	Disconnect  *Disconnect  `protobuf:"bytes,11,opt,name=disconnect,proto3" json:"disconnect,omitempty"`
	Refresh     *Refresh     `protobuf:"bytes,12,opt,name=refresh,proto3" json:"refresh,omitempty"`
	// contains filtered or unexported fields
}

Push can be sent to a client as part of Reply in case of bidirectional transport or without additional wrapping in case of unidirectional transports. ProtocolVersion2 uses channel and one of the possible concrete push messages.

func (*Push) Descriptor deprecated

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

Deprecated: Use Push.ProtoReflect.Descriptor instead.

func (*Push) GetChannel

func (x *Push) GetChannel() string

func (*Push) GetConnect

func (x *Push) GetConnect() *Connect

func (*Push) GetDisconnect

func (x *Push) GetDisconnect() *Disconnect

func (*Push) GetJoin

func (x *Push) GetJoin() *Join

func (*Push) GetLeave

func (x *Push) GetLeave() *Leave

func (*Push) GetMessage

func (x *Push) GetMessage() *Message

func (*Push) GetPub

func (x *Push) GetPub() *Publication

func (*Push) GetRefresh

func (x *Push) GetRefresh() *Refresh

func (*Push) GetSubscribe

func (x *Push) GetSubscribe() *Subscribe

func (*Push) GetUnsubscribe

func (x *Push) GetUnsubscribe() *Unsubscribe

func (*Push) ProtoMessage

func (*Push) ProtoMessage()

func (*Push) ProtoReflect

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

func (*Push) Reset

func (x *Push) Reset()

func (*Push) String

func (x *Push) String() string

type Refresh

type Refresh struct {
	Expires bool   `protobuf:"varint,1,opt,name=expires,proto3" json:"expires,omitempty"`
	Ttl     uint32 `protobuf:"varint,2,opt,name=ttl,proto3" json:"ttl,omitempty"`
	// contains filtered or unexported fields
}

func (*Refresh) Descriptor deprecated

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

Deprecated: Use Refresh.ProtoReflect.Descriptor instead.

func (*Refresh) GetExpires

func (x *Refresh) GetExpires() bool

func (*Refresh) GetTtl

func (x *Refresh) GetTtl() uint32

func (*Refresh) ProtoMessage

func (*Refresh) ProtoMessage()

func (*Refresh) ProtoReflect

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

func (*Refresh) Reset

func (x *Refresh) Reset()

func (*Refresh) String

func (x *Refresh) String() string

type Subscribe

type Subscribe struct {
	Recoverable bool   `protobuf:"varint,1,opt,name=recoverable,proto3" json:"recoverable,omitempty"`
	Epoch       string `protobuf:"bytes,4,opt,name=epoch,proto3" json:"epoch,omitempty"`
	Offset      uint64 `protobuf:"varint,5,opt,name=offset,proto3" json:"offset,omitempty"`
	Positioned  bool   `protobuf:"varint,6,opt,name=positioned,proto3" json:"positioned,omitempty"`
	Data        []byte `protobuf:"bytes,7,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*Subscribe) Descriptor deprecated

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

Deprecated: Use Subscribe.ProtoReflect.Descriptor instead.

func (*Subscribe) GetData

func (x *Subscribe) GetData() []byte

func (*Subscribe) GetEpoch

func (x *Subscribe) GetEpoch() string

func (*Subscribe) GetOffset

func (x *Subscribe) GetOffset() uint64

func (*Subscribe) GetPositioned

func (x *Subscribe) GetPositioned() bool

func (*Subscribe) GetRecoverable

func (x *Subscribe) GetRecoverable() bool

func (*Subscribe) ProtoMessage

func (*Subscribe) ProtoMessage()

func (*Subscribe) ProtoReflect

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

func (*Subscribe) Reset

func (x *Subscribe) Reset()

func (*Subscribe) String

func (x *Subscribe) String() string

type SubscribeRequest

type SubscribeRequest struct {

	// Numeration is in sync with Centrifuge client protocol.
	Recover bool   `protobuf:"varint,3,opt,name=recover,proto3" json:"recover,omitempty"`
	Epoch   string `protobuf:"bytes,6,opt,name=epoch,proto3" json:"epoch,omitempty"`
	Offset  uint64 `protobuf:"varint,7,opt,name=offset,proto3" json:"offset,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscribeRequest) Descriptor deprecated

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

Deprecated: Use SubscribeRequest.ProtoReflect.Descriptor instead.

func (*SubscribeRequest) GetEpoch

func (x *SubscribeRequest) GetEpoch() string

func (*SubscribeRequest) GetOffset

func (x *SubscribeRequest) GetOffset() uint64

func (*SubscribeRequest) GetRecover

func (x *SubscribeRequest) GetRecover() bool

func (*SubscribeRequest) ProtoMessage

func (*SubscribeRequest) ProtoMessage()

func (*SubscribeRequest) ProtoReflect

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

func (*SubscribeRequest) Reset

func (x *SubscribeRequest) Reset()

func (*SubscribeRequest) String

func (x *SubscribeRequest) String() string

type SubscribeResult

type SubscribeResult struct {
	Expires       bool           `protobuf:"varint,1,opt,name=expires,proto3" json:"expires,omitempty"`
	Ttl           uint32         `protobuf:"varint,2,opt,name=ttl,proto3" json:"ttl,omitempty"`
	Recoverable   bool           `protobuf:"varint,3,opt,name=recoverable,proto3" json:"recoverable,omitempty"`
	Epoch         string         `protobuf:"bytes,6,opt,name=epoch,proto3" json:"epoch,omitempty"`
	Publications  []*Publication `protobuf:"bytes,7,rep,name=publications,proto3" json:"publications,omitempty"`
	Recovered     bool           `protobuf:"varint,8,opt,name=recovered,proto3" json:"recovered,omitempty"`
	Offset        uint64         `protobuf:"varint,9,opt,name=offset,proto3" json:"offset,omitempty"`
	Positioned    bool           `protobuf:"varint,10,opt,name=positioned,proto3" json:"positioned,omitempty"`
	Data          []byte         `protobuf:"bytes,11,opt,name=data,proto3" json:"data,omitempty"`
	WasRecovering bool           `protobuf:"varint,12,opt,name=was_recovering,json=wasRecovering,proto3" json:"was_recovering,omitempty"`
	// contains filtered or unexported fields
}

func (*SubscribeResult) Descriptor deprecated

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

Deprecated: Use SubscribeResult.ProtoReflect.Descriptor instead.

func (*SubscribeResult) GetData

func (x *SubscribeResult) GetData() []byte

func (*SubscribeResult) GetEpoch

func (x *SubscribeResult) GetEpoch() string

func (*SubscribeResult) GetExpires

func (x *SubscribeResult) GetExpires() bool

func (*SubscribeResult) GetOffset

func (x *SubscribeResult) GetOffset() uint64

func (*SubscribeResult) GetPositioned

func (x *SubscribeResult) GetPositioned() bool

func (*SubscribeResult) GetPublications

func (x *SubscribeResult) GetPublications() []*Publication

func (*SubscribeResult) GetRecoverable

func (x *SubscribeResult) GetRecoverable() bool

func (*SubscribeResult) GetRecovered

func (x *SubscribeResult) GetRecovered() bool

func (*SubscribeResult) GetTtl

func (x *SubscribeResult) GetTtl() uint32

func (*SubscribeResult) GetWasRecovering

func (x *SubscribeResult) GetWasRecovering() bool

func (*SubscribeResult) ProtoMessage

func (*SubscribeResult) ProtoMessage()

func (*SubscribeResult) ProtoReflect

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

func (*SubscribeResult) Reset

func (x *SubscribeResult) Reset()

func (*SubscribeResult) String

func (x *SubscribeResult) String() string

type UnimplementedCentrifugoUniStreamServer

type UnimplementedCentrifugoUniStreamServer struct {
}

UnimplementedCentrifugoUniStreamServer must be embedded to have forward compatible implementations.

func (UnimplementedCentrifugoUniStreamServer) Consume

type UnsafeCentrifugoUniStreamServer

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

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

type Unsubscribe

type Unsubscribe struct {
	Code   uint32 `protobuf:"varint,2,opt,name=code,proto3" json:"code,omitempty"`
	Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason,omitempty"`
	// contains filtered or unexported fields
}

func (*Unsubscribe) Descriptor deprecated

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

Deprecated: Use Unsubscribe.ProtoReflect.Descriptor instead.

func (*Unsubscribe) GetCode

func (x *Unsubscribe) GetCode() uint32

func (*Unsubscribe) GetReason

func (x *Unsubscribe) GetReason() string

func (*Unsubscribe) ProtoMessage

func (*Unsubscribe) ProtoMessage()

func (*Unsubscribe) ProtoReflect

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

func (*Unsubscribe) Reset

func (x *Unsubscribe) Reset()

func (*Unsubscribe) String

func (x *Unsubscribe) String() string

Jump to

Keyboard shortcuts

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