Documentation ¶
Index ¶
- Constants
- type ClusterConnStore
- func (s *ClusterConnStore) ClusterMembers() ([]string, error)
- func (s *ClusterConnStore) GetAllConnNum() (uint64, error)
- func (s *ClusterConnStore) KeepClusterClear()
- func (s *ClusterConnStore) OneClientAtomicAddBy(clientIP string, num int64) error
- func (s *ClusterConnStore) RemoveClient(clientIP string) error
- func (s *ClusterConnStore) SelectMaster()
- type ClusterStore
- type ClusterTopicStore
- func (s *ClusterTopicStore) ClusterTopics() (map[string]uint64, error)
- func (s *ClusterTopicStore) GetTopicConnNum(topic string) (uint64, error)
- func (s *ClusterTopicStore) RemoveTopic(topic string) error
- func (s *ClusterTopicStore) TopicConnAtomicAddBy(topic string, num int64) error
- func (s *ClusterTopicStore) Topics() (map[string]uint64, error)
- type RedisProvider
Constants ¶
View Source
const (
ClusterConnKey = "ft_cluster_conn"
)
View Source
const (
ClusterKey = "firetower_cluster_number"
)
View Source
const (
ClusterTopicKeyPrefix = "ft_topics_conn_"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterConnStore ¶
func (*ClusterConnStore) ClusterMembers ¶
func (s *ClusterConnStore) ClusterMembers() ([]string, error)
func (*ClusterConnStore) GetAllConnNum ¶
func (s *ClusterConnStore) GetAllConnNum() (uint64, error)
func (*ClusterConnStore) KeepClusterClear ¶
func (s *ClusterConnStore) KeepClusterClear()
func (*ClusterConnStore) OneClientAtomicAddBy ¶
func (s *ClusterConnStore) OneClientAtomicAddBy(clientIP string, num int64) error
func (*ClusterConnStore) RemoveClient ¶
func (s *ClusterConnStore) RemoveClient(clientIP string) error
func (*ClusterConnStore) SelectMaster ¶
func (s *ClusterConnStore) SelectMaster()
type ClusterStore ¶
type ClusterStore struct {
// contains filtered or unexported fields
}
func (*ClusterStore) ClusterNumber ¶
func (s *ClusterStore) ClusterNumber() (int64, error)
type ClusterTopicStore ¶
func (*ClusterTopicStore) ClusterTopics ¶
func (s *ClusterTopicStore) ClusterTopics() (map[string]uint64, error)
func (*ClusterTopicStore) GetTopicConnNum ¶
func (s *ClusterTopicStore) GetTopicConnNum(topic string) (uint64, error)
func (*ClusterTopicStore) RemoveTopic ¶
func (s *ClusterTopicStore) RemoveTopic(topic string) error
func (*ClusterTopicStore) TopicConnAtomicAddBy ¶
func (s *ClusterTopicStore) TopicConnAtomicAddBy(topic string, num int64) error
type RedisProvider ¶
type RedisProvider struct {
// contains filtered or unexported fields
}
func Setup ¶
func Setup(addr, password string, db int, clientIP, keyPrefix string) (*RedisProvider, error)
func (*RedisProvider) ClusterConnStore ¶
func (s *RedisProvider) ClusterConnStore() store.ClusterConnStore
func (*RedisProvider) ClusterStore ¶
func (s *RedisProvider) ClusterStore() store.ClusterStore
func (*RedisProvider) ClusterTopicStore ¶
func (s *RedisProvider) ClusterTopicStore() store.ClusterTopicStore
Click to show internal directories.
Click to hide internal directories.