Versions in this module Expand all Collapse all v0 v0.2.0 Sep 7, 2020 Changes in this version + const MQTTSessionItemType + const MetaDataItemType + const SSOffsetItemType + const StreamInfoItemType + const StreamServerHeartbeatItemType + const StreamServerInfoItemType + var File_streamIO_meta_server_store_items_proto protoreflect.FileDescriptor + func MarshalItem(x Item) ([]byte, error) + func UnmarshalItem(data []byte) (mmdb.Item, error) + type Item interface + GetType func() uint16 + UnmarshalBinary func(data []byte) error + type MQTTSessionItem struct + AccessTs int64 + ClientIdentifier string + CreateTs int64 + Qos0StreamInfo *StreamInfoItem + Qos1StreamInfo *StreamInfoItem + SessionId int64 + Topics map[string]int32 + func (*MQTTSessionItem) Descriptor() ([]byte, []int) + func (*MQTTSessionItem) ProtoMessage() + func (x *MQTTSessionItem) Clone() *MQTTSessionItem + func (x *MQTTSessionItem) GetAccessTs() int64 + func (x *MQTTSessionItem) GetClientIdentifier() string + func (x *MQTTSessionItem) GetCreateTs() int64 + func (x *MQTTSessionItem) GetQos0StreamInfo() *StreamInfoItem + func (x *MQTTSessionItem) GetQos1StreamInfo() *StreamInfoItem + func (x *MQTTSessionItem) GetSessionId() int64 + func (x *MQTTSessionItem) GetTopics() map[string]int32 + func (x *MQTTSessionItem) GetType() uint16 + func (x *MQTTSessionItem) Less(other btree.Item) bool + func (x *MQTTSessionItem) MarshalBinary() (data []byte, err error) + func (x *MQTTSessionItem) ProtoReflect() protoreflect.Message + func (x *MQTTSessionItem) Reset() + func (x *MQTTSessionItem) String() string + func (x *MQTTSessionItem) UnmarshalBinary(data []byte) error + type MetaDataItem struct + Key int32 + NextStreamId int64 + func (*MetaDataItem) Descriptor() ([]byte, []int) + func (*MetaDataItem) ProtoMessage() + func (x *MetaDataItem) GetKey() int32 + func (x *MetaDataItem) GetNextStreamId() int64 + func (x *MetaDataItem) GetType() uint16 + func (x *MetaDataItem) Less(other btree.Item) bool + func (x *MetaDataItem) MarshalBinary() (data []byte, err error) + func (x *MetaDataItem) ProtoReflect() protoreflect.Message + func (x *MetaDataItem) Reset() + func (x *MetaDataItem) String() string + func (x *MetaDataItem) UnmarshalBinary(data []byte) error + type MetaServerInfoItem struct + Base *ServerInfoBase + func (*MetaServerInfoItem) Descriptor() ([]byte, []int) + func (*MetaServerInfoItem) ProtoMessage() + func (x *MetaServerInfoItem) GetBase() *ServerInfoBase + func (x *MetaServerInfoItem) ProtoReflect() protoreflect.Message + func (x *MetaServerInfoItem) Reset() + func (x *MetaServerInfoItem) String() string + type SSOffsetItem struct + Offset int64 + SessionId int64 + StreamId int64 + func (*SSOffsetItem) Descriptor() ([]byte, []int) + func (*SSOffsetItem) ProtoMessage() + func (x *SSOffsetItem) GetOffset() int64 + func (x *SSOffsetItem) GetSessionId() int64 + func (x *SSOffsetItem) GetStreamId() int64 + func (x *SSOffsetItem) GetType() uint16 + func (x *SSOffsetItem) Less(other btree.Item) bool + func (x *SSOffsetItem) MarshalBinary() (data []byte, err error) + func (x *SSOffsetItem) ProtoReflect() protoreflect.Message + func (x *SSOffsetItem) Reset() + func (x *SSOffsetItem) String() string + func (x *SSOffsetItem) UnmarshalBinary(data []byte) error + type ServerInfoBase struct + Addr string + Id int64 + Leader bool + func (*ServerInfoBase) Descriptor() ([]byte, []int) + func (*ServerInfoBase) ProtoMessage() + func (x *ServerInfoBase) GetAddr() string + func (x *ServerInfoBase) GetId() int64 + func (x *ServerInfoBase) GetLeader() bool + func (x *ServerInfoBase) ProtoReflect() protoreflect.Message + func (x *ServerInfoBase) Reset() + func (x *ServerInfoBase) String() string + type Store struct + func OpenStore(options mmdb.Options) *Store + func (store *Store) AddStreamServer(item *StreamServerInfoItem) (*StreamServerInfoItem, error) + func (store *Store) CreateStream(name string) (item *StreamInfoItem, create bool, err error) + func (store *Store) DelOffset(sessionID int64, streamID int64) (*SSOffsetItem, error) + func (store *Store) DeleteMQTTClientSession(identifier string) (*MQTTSessionItem, error) + func (store *Store) DeleteStreamServer(item *StreamServerInfoItem) error + func (store *Store) GetOffset(SessionId int64, StreamId int64) (*SSOffsetItem, error) + func (store *Store) GetOffsets() ([]*SSOffsetItem, error) + func (store *Store) GetOrCreateMQTTSession(identifier string) (*MQTTSessionItem, bool, error) + func (store *Store) GetStream(name string) (*StreamInfoItem, error) + func (store *Store) GetStreamServerHeartbeatItem(ID int64) (*StreamServerHeartbeatItem, error) + func (store *Store) GetStreamServerInfo(id int64) (*StreamServerInfoItem, error) + func (store *Store) InsertStreamServerHeartbeatItem(item *StreamServerHeartbeatItem) error + func (store *Store) ListStreamServer() ([]*StreamServerInfoItem, error) + func (store *Store) ListStreamServerHeartbeat() ([]*StreamServerHeartbeatItem, error) + func (store *Store) SetOffSet(items []*SSOffsetItem) error + func (store *Store) UpdateMQTTClientSession(ClientIdentifier string, UnSubscribe []string, Subscribe map[string]int32) error + type StreamInfoItem struct + Name string + StreamId int64 + StreamServerId int64 + func NewStreamInfoItem(ID int64, name string) *StreamInfoItem + func (*StreamInfoItem) Descriptor() ([]byte, []int) + func (*StreamInfoItem) ProtoMessage() + func (x *StreamInfoItem) GetName() string + func (x *StreamInfoItem) GetStreamId() int64 + func (x *StreamInfoItem) GetStreamServerId() int64 + func (x *StreamInfoItem) GetType() uint16 + func (x *StreamInfoItem) Less(other btree.Item) bool + func (x *StreamInfoItem) MarshalBinary() (data []byte, err error) + func (x *StreamInfoItem) ProtoReflect() protoreflect.Message + func (x *StreamInfoItem) Reset() + func (x *StreamInfoItem) String() string + func (x *StreamInfoItem) UnmarshalBinary(data []byte) error + type StreamServerHeartbeatItem struct + Base *ServerInfoBase + Timestamp *timestamp.Timestamp + func (*StreamServerHeartbeatItem) Descriptor() ([]byte, []int) + func (*StreamServerHeartbeatItem) ProtoMessage() + func (x *StreamServerHeartbeatItem) GetBase() *ServerInfoBase + func (x *StreamServerHeartbeatItem) GetTimestamp() *timestamp.Timestamp + func (x *StreamServerHeartbeatItem) GetType() uint16 + func (x *StreamServerHeartbeatItem) Less(other btree.Item) bool + func (x *StreamServerHeartbeatItem) MarshalBinary() (data []byte, err error) + func (x *StreamServerHeartbeatItem) ProtoReflect() protoreflect.Message + func (x *StreamServerHeartbeatItem) Reset() + func (x *StreamServerHeartbeatItem) String() string + func (x *StreamServerHeartbeatItem) UnmarshalBinary(data []byte) error + type StreamServerInfoItem struct + Base *ServerInfoBase + func (*StreamServerInfoItem) Descriptor() ([]byte, []int) + func (*StreamServerInfoItem) ProtoMessage() + func (x *StreamServerInfoItem) GetBase() *ServerInfoBase + func (x *StreamServerInfoItem) GetType() uint16 + func (x *StreamServerInfoItem) Less(other btree.Item) bool + func (x *StreamServerInfoItem) MarshalBinary() (data []byte, err error) + func (x *StreamServerInfoItem) ProtoReflect() protoreflect.Message + func (x *StreamServerInfoItem) Reset() + func (x *StreamServerInfoItem) String() string + func (x *StreamServerInfoItem) UnmarshalBinary(data []byte) error