Documentation ¶
Index ¶
- Constants
- type PubSubClient
- type PubSubReply
- type Redis
- type RedisClient
- type RedisConnection
- type RedisPubSubReply
- type SentinelClient
- func (m *SentinelClient) Close()
- func (m *SentinelClient) DiscoverMasterForCluster(clusterName string) (*types.MasterDetails, error)
- func (client *SentinelClient) FindConnectedSentinels(clustername string) ([]types.Sentinel, error)
- func (client *SentinelClient) FindKnownClusters() ([]string, error)
- func (m *SentinelClient) Ping() error
Constants ¶
View Source
const ( Confirmation = 1 Message = 2 )
View Source
const (
RedisConnectionTimeoutPeriod = time.Second * 2
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PubSubClient ¶
type PubSubClient struct {
// contains filtered or unexported fields
}
func NewPubSubClient ¶
func NewPubSubClient(url string, channel chan RedisPubSubReply, redisConnection RedisConnection) (*PubSubClient, error)
func (*PubSubClient) Close ¶
func (client *PubSubClient) Close()
func (*PubSubClient) Start ¶
func (client *PubSubClient) Start(key string) error
type PubSubReply ¶
type PubSubReply struct {
// contains filtered or unexported fields
}
func (PubSubReply) Channel ¶
func (p PubSubReply) Channel() string
func (PubSubReply) Err ¶
func (p PubSubReply) Err() error
func (PubSubReply) Message ¶
func (p PubSubReply) Message() string
func (PubSubReply) MessageType ¶
func (p PubSubReply) MessageType() int
type Redis ¶
type Redis interface {
GetConnection(protocol, uri string) (RedisClient, error)
}
type RedisClient ¶
type RedisClient interface { ClosePool() SentinelGetMaster(cluster string) (structures.MasterAddress, error) SentinelSentinels(cluster string) ([]structures.SentinelInfo, error) SentinelMasters() ([]structures.MasterInfo, error) Ping() error PubSub() (*client.PubSub, error) }
type RedisConnection ¶
type RedisConnection struct{}
func (RedisConnection) GetConnection ¶
func (RedisConnection) GetConnection(protocol, uri string) (RedisClient, error)
type RedisPubSubReply ¶
func NewRedisPubSubReply ¶
func NewRedisPubSubReply(message []string, err error) RedisPubSubReply
type SentinelClient ¶
type SentinelClient struct {
// contains filtered or unexported fields
}
func NewSentinelClient ¶
func NewSentinelClient(sentinel types.Sentinel, redisConnection RedisConnection) (*SentinelClient, error)
func (*SentinelClient) Close ¶
func (m *SentinelClient) Close()
func (*SentinelClient) DiscoverMasterForCluster ¶
func (m *SentinelClient) DiscoverMasterForCluster(clusterName string) (*types.MasterDetails, error)
func (*SentinelClient) FindConnectedSentinels ¶
func (client *SentinelClient) FindConnectedSentinels(clustername string) ([]types.Sentinel, error)
func (*SentinelClient) FindKnownClusters ¶
func (client *SentinelClient) FindKnownClusters() ([]string, error)
func (*SentinelClient) Ping ¶
func (m *SentinelClient) Ping() error
Click to show internal directories.
Click to hide internal directories.