repo

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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) Start

func (m *MessageRepo) Start(ctx context.Context, config config.SIConfig) error

func (*MessageRepo) Stop

func (m *MessageRepo) Stop(ctx context.Context) 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 (s *SessionRepo) CacheInflowMsg(ctx context.Context, clientId string, message messagev5.Message) error

func (*SessionRepo) CacheOutflowMsg

func (s *SessionRepo) CacheOutflowMsg(ctx context.Context, clientId string, message messagev5.Message) error

func (*SessionRepo) CacheOutflowSecMsgId

func (s *SessionRepo) CacheOutflowSecMsgId(ctx context.Context, clientId string, pkId uint16) error

func (*SessionRepo) ClearOfflineMsgById

func (s *SessionRepo) ClearOfflineMsgById(ctx context.Context, clientId string, msgIds []string) error

func (*SessionRepo) ClearOfflineMsgs

func (s *SessionRepo) ClearOfflineMsgs(ctx context.Context, clientId string) error

func (*SessionRepo) ClearSession

func (s *SessionRepo) ClearSession(ctx context.Context, clientId string, clearOfflineMsg bool) error

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 (s *SessionRepo) GetAllInflowMsg(ctx context.Context, clientId string) (t []messagev5.Message, e error)

func (*SessionRepo) GetAllOfflineMsg

func (s *SessionRepo) GetAllOfflineMsg(ctx context.Context, clientId string) (t []messagev5.Message, mi []string, e error)

返回离线消息,和对应的消息id

func (*SessionRepo) GetAllOutflowMsg

func (s *SessionRepo) GetAllOutflowMsg(ctx context.Context, clientId string) (t []messagev5.Message, e error)

func (*SessionRepo) GetAllOutflowSecMsg

func (s *SessionRepo) GetAllOutflowSecMsg(ctx context.Context, clientId string) (t []uint16, e error)

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 (s *SessionRepo) ReleaseInflowMsg(ctx context.Context, clientId string, pkId uint16) (messagev5.Message, error)

func (*SessionRepo) ReleaseOutflowMsg

func (s *SessionRepo) ReleaseOutflowMsg(ctx context.Context, clientId string, pkId uint16) (messagev5.Message, error)

func (*SessionRepo) ReleaseOutflowSecMsgId

func (s *SessionRepo) ReleaseOutflowSecMsgId(ctx context.Context, clientId string, pkId uint16) error

func (*SessionRepo) Start

func (s *SessionRepo) Start(ctx context.Context, config config.SIConfig) error

func (*SessionRepo) Stop

func (s *SessionRepo) Stop(ctx context.Context) error

func (*SessionRepo) StoreOfflineMsg

func (s *SessionRepo) StoreOfflineMsg(ctx context.Context, clientId string, message messagev5.Message) error

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

Jump to

Keyboard shortcuts

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