sender

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultProcCronPeriod = time.Duration(5) * time.Second    //ProcCron的周期,默认1s
	DefaultLogCronPeriod  = time.Duration(3600) * time.Second //LogCron的周期,默认300s
)
View Source
const (
	DefaultSendQueueMaxSize = 102400 //10.24wß
)
View Source
const (
	DefaultSendTaskSleepInterval = time.Millisecond * 50 //默认睡眠间隔为50ms
)

send

Variables

View Source
var (
	TrendQueues   = make(map[string]*nlist.SafeListLimited)
	TransferQueue *nlist.SafeListLimited
)

发送缓存队列 node -> queue_of_data

View Source
var (
	TrendConnPools    *backend.SafeRpcConnPools
	TransferConnPools *backend.SafeRpcConnPools
	TransferMap       = make(map[string]string, 0)
	TransferHostnames = make([]string, 0)
)

连接池 node_address -> connection_pool

View Source
var (
	TrendNodeRing *rings.ConsistentHashNodeRing
)

服务节点的一致性哈希环 pk -> node

Functions

func DestroyConnPools

func DestroyConnPools()

func Push2TransferSendQueue

func Push2TransferSendQueue(item *model.TrendItem)

将原始数据入到transfer发送缓存队列

func Push2TrendSendQueue

func Push2TrendSendQueue(val string)

将数据 打入 某个AggregaotrPlus的发送缓存队列, 具体是哪一个由一致性哈希决定

func Start

func Start()

初始化数据发送服务, 在main函数中调用

Types

This section is empty.

Jump to

Keyboard shortcuts

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