Documentation
¶
Index ¶
- func NewEventStore() store2.EventStore
- func NewMessageStore() store2.MessageStore
- func NewSessionStore() store2.SessionStore
- type MessageRepo
- func (m *MessageRepo) ClearRetainMessage(ctx context.Context, topic string) error
- func (m *MessageRepo) ClearWillMessage(ctx context.Context, clientId string) error
- func (m *MessageRepo) GetAllRetainMsg(ctx context.Context) ([]*messagev5.PublishMessage, error)
- func (m *MessageRepo) GetRetainMessage(ctx context.Context, topic string) (*messagev5.PublishMessage, error)
- func (m *MessageRepo) GetWillMessage(ctx context.Context, clientId string) (*messagev5.PublishMessage, error)
- func (m *MessageRepo) Start(ctx context.Context, config config.SIConfig) error
- func (m *MessageRepo) Stop(ctx context.Context) error
- func (m *MessageRepo) StoreRetainMessage(ctx context.Context, topic string, message *messagev5.PublishMessage) error
- func (m *MessageRepo) StoreWillMessage(ctx context.Context, clientId string, message *messagev5.PublishMessage) error
- type SessionRepo
- func (s *SessionRepo) CacheInflowMsg(ctx context.Context, clientId string, message messagev5.Message) error
- func (s *SessionRepo) CacheOutflowMsg(ctx context.Context, clientId string, message messagev5.Message) error
- func (s *SessionRepo) CacheOutflowSecMsgId(ctx context.Context, clientId string, pkId uint16) error
- func (s *SessionRepo) ClearOfflineMsgById(ctx context.Context, clientId string, msgIds []string) error
- func (s *SessionRepo) ClearOfflineMsgs(ctx context.Context, clientId string) error
- func (s *SessionRepo) ClearSession(ctx context.Context, clientId string, clearOfflineMsg bool) error
- func (s *SessionRepo) ClearSubscriptions(ctx context.Context, clientId string) error
- func (s *SessionRepo) DelSubscription(ctx context.Context, clientId, topic string) error
- func (s *SessionRepo) GetAllInflowMsg(ctx context.Context, clientId string) (t []messagev5.Message, e error)
- func (s *SessionRepo) GetAllOfflineMsg(ctx context.Context, clientId string) (t []messagev5.Message, mi []string, e error)
- func (s *SessionRepo) GetAllOutflowMsg(ctx context.Context, clientId string) (t []messagev5.Message, e error)
- func (s *SessionRepo) GetAllOutflowSecMsg(ctx context.Context, clientId string) (t []uint16, e error)
- func (s *SessionRepo) GetSession(ctx context.Context, clientId string) (sessionsv5.Session, error)
- func (s *SessionRepo) GetSubscriptions(ctx context.Context, clientId string) ([]*messagev5.SubscribeMessage, error)
- func (s *SessionRepo) ReleaseInflowMsg(ctx context.Context, clientId string, pkId uint16) (messagev5.Message, error)
- func (s *SessionRepo) ReleaseOutflowMsg(ctx context.Context, clientId string, pkId uint16) (messagev5.Message, error)
- func (s *SessionRepo) ReleaseOutflowSecMsgId(ctx context.Context, clientId string, pkId uint16) error
- func (s *SessionRepo) Start(ctx context.Context, config config.SIConfig) error
- func (s *SessionRepo) Stop(ctx context.Context) error
- func (s *SessionRepo) StoreOfflineMsg(ctx context.Context, clientId string, message messagev5.Message) error
- func (s *SessionRepo) StoreSession(ctx context.Context, clientId string, session sessionsv5.Session) error
- func (s *SessionRepo) StoreSubscription(ctx context.Context, clientId string, subscription *messagev5.SubscribeMessage) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEventStore ¶
func NewEventStore() store2.EventStore
func NewMessageStore ¶
func NewMessageStore() store2.MessageStore
func NewSessionStore ¶
func NewSessionStore() store2.SessionStore
Types ¶
type MessageRepo ¶
type MessageRepo struct {
// contains filtered or unexported fields
}
func (*MessageRepo) ClearRetainMessage ¶
func (m *MessageRepo) ClearRetainMessage(ctx context.Context, topic string) error
func (*MessageRepo) ClearWillMessage ¶
func (m *MessageRepo) ClearWillMessage(ctx context.Context, clientId string) error
func (*MessageRepo) GetAllRetainMsg ¶
func (m *MessageRepo) GetAllRetainMsg(ctx context.Context) ([]*messagev5.PublishMessage, error)
func (*MessageRepo) GetRetainMessage ¶
func (m *MessageRepo) GetRetainMessage(ctx context.Context, topic string) (*messagev5.PublishMessage, error)
func (*MessageRepo) GetWillMessage ¶
func (m *MessageRepo) GetWillMessage(ctx context.Context, clientId string) (*messagev5.PublishMessage, error)
func (*MessageRepo) StoreRetainMessage ¶
func (m *MessageRepo) StoreRetainMessage(ctx context.Context, topic string, message *messagev5.PublishMessage) error
func (*MessageRepo) StoreWillMessage ¶
func (m *MessageRepo) StoreWillMessage(ctx context.Context, clientId string, message *messagev5.PublishMessage) error
type SessionRepo ¶
type SessionRepo struct {
// contains filtered or unexported fields
}
func (*SessionRepo) CacheInflowMsg ¶
func (*SessionRepo) CacheOutflowMsg ¶
func (*SessionRepo) CacheOutflowSecMsgId ¶
func (*SessionRepo) ClearOfflineMsgById ¶
func (*SessionRepo) ClearOfflineMsgs ¶
func (s *SessionRepo) ClearOfflineMsgs(ctx context.Context, clientId string) error
func (*SessionRepo) ClearSession ¶
func (*SessionRepo) ClearSubscriptions ¶
func (s *SessionRepo) ClearSubscriptions(ctx context.Context, clientId string) error
func (*SessionRepo) DelSubscription ¶
func (s *SessionRepo) DelSubscription(ctx context.Context, clientId, topic string) error
func (*SessionRepo) GetAllInflowMsg ¶
func (*SessionRepo) GetAllOfflineMsg ¶
func (s *SessionRepo) GetAllOfflineMsg(ctx context.Context, clientId string) (t []messagev5.Message, mi []string, e error)
返回离线消息,和对应的消息id
func (*SessionRepo) GetAllOutflowMsg ¶
func (*SessionRepo) GetAllOutflowSecMsg ¶
func (*SessionRepo) GetSession ¶
func (s *SessionRepo) GetSession(ctx context.Context, clientId string) (sessionsv5.Session, error)
func (*SessionRepo) GetSubscriptions ¶
func (s *SessionRepo) GetSubscriptions(ctx context.Context, clientId string) ([]*messagev5.SubscribeMessage, error)
func (*SessionRepo) ReleaseInflowMsg ¶
func (*SessionRepo) ReleaseOutflowMsg ¶
func (*SessionRepo) ReleaseOutflowSecMsgId ¶
func (*SessionRepo) StoreOfflineMsg ¶
func (*SessionRepo) StoreSession ¶
func (s *SessionRepo) StoreSession(ctx context.Context, clientId string, session sessionsv5.Session) error
func (*SessionRepo) StoreSubscription ¶
func (s *SessionRepo) StoreSubscription(ctx context.Context, clientId string, subscription *messagev5.SubscribeMessage) error
Click to show internal directories.
Click to hide internal directories.