Versions in this module Expand all Collapse all v1 v1.2.3 Dec 10, 2022 Changes in this version + const CodecJSON + const CodecMsgp + const KClient + const KInflight + const KPrefix + const KRetained + const KServerInfo + const KSubscription + const KSuffix + var ErrEmptyStruct = errors.New("struct cannot be empty") + var ErrNotConnected = errors.New("redis not connected") + var LocalIP = "127.0.0.1" + type Store struct + func New(opts *redis.Options) *Store + func (s *Store) Close() + func (s *Store) Del(key string) error + func (s *Store) DeleteClient(cid string) error + func (s *Store) DeleteInflight(cid string, pid uint16) error + func (s *Store) DeleteInflightBatch(cid string, pids []uint16) error + func (s *Store) DeleteRetained(topic string) error + func (s *Store) DeleteSubscription(cid, filter string) error + func (s *Store) GenInflightId(cid string, pid uint16) string + func (s *Store) GenRetainedId(topic string) string + func (s *Store) GenSubscriptionId(cid, filter string) string + func (s *Store) HDel(key string, ids ...string) error + func (s *Store) HSet(key string, id string, v interface{}) error + func (s *Store) HSet2(key string, id string, val []byte) error + func (s *Store) Open() error + func (s *Store) ReadClientByCid(cid string) (v persistence.Client, err error) + func (s *Store) ReadInflightByCid(cid string) (v []persistence.Message, err error) + func (s *Store) ReadRetainedByTopic(topic string) (v persistence.Message, err error) + func (s *Store) ReadServerInfo() (v persistence.ServerInfo, err error) + func (s *Store) ReadSubscriptionsByCid(cid string) (v []persistence.Subscription, err error) + func (s *Store) Set(key string, v interface{}) error + func (s *Store) WriteClient(v persistence.Client) error + func (s *Store) WriteInflight(v persistence.Message) error + func (s *Store) WriteRetained(v persistence.Message) error + func (s *Store) WriteServerInfo(v persistence.ServerInfo) error + func (s *Store) WriteSubscription(v persistence.Subscription) error