Documentation ¶
Index ¶
Constants ¶
View Source
const NodeReplicas = 500
Variables ¶
View Source
var HashRing = NewConsistentHashRing(int32(NodeReplicas), []string{})
for alert_rule sharding
Functions ¶
func RebuildConsistentHashRing ¶
func RebuildConsistentHashRing(nodes []string)
Types ¶
type ConsistentHashRing ¶
func NewConsistentHashRing ¶
func NewConsistentHashRing(replicas int32, nodes []string) *ConsistentHashRing
func (*ConsistentHashRing) GetNode ¶
func (chr *ConsistentHashRing) GetNode(pk string) (string, error)
func (*ConsistentHashRing) GetRing ¶
func (chr *ConsistentHashRing) GetRing() *consistent.Consistent
func (*ConsistentHashRing) Set ¶
func (chr *ConsistentHashRing) Set(r *consistent.Consistent)
Click to show internal directories.
Click to hide internal directories.