sender

package
v0.0.0-...-c7d11a2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

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