sender

package
v0.0.0-...-362a939 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: Apache-2.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

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)

Jump to

Keyboard shortcuts

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