redis

package
v0.4.2-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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

type ClusterConnStore struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

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

type ClusterTopicStore struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

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

func (*ClusterTopicStore) Topics

func (s *ClusterTopicStore) Topics() (map[string]uint64, 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

Jump to

Keyboard shortcuts

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