Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendToAlarm ¶
func SendToAlarm(Q *list.SafeListLimited, node string)
Types ¶
type ConsistentHashNodeRing ¶
type ConsistentHashNodeRing struct {
// contains filtered or unexported fields
}
var ( NodeRing *ConsistentHashNodeRing // 服务节点的一致性哈希环 SendQueues map[string]*list.SafeListLimited // 发送缓存队列,减少发起连接次数 )
func NewConsistentHashNodeRing ¶
func NewConsistentHashNodeRing(NumberOfReplicas int, nodes []string) *ConsistentHashNodeRing
func (*ConsistentHashNodeRing) GetNode ¶
func (this *ConsistentHashNodeRing) GetNode(pk string) (string, error)
func (*ConsistentHashNodeRing) SetNodes ¶
func (this *ConsistentHashNodeRing) SetNodes(nodes []string)
func (*ConsistentHashNodeRing) SetNumberOfReplicas ¶
func (this *ConsistentHashNodeRing) SetNumberOfReplicas(num int)
Click to show internal directories.
Click to hide internal directories.