throttler

package
v0.0.0-...-9634a1a Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	THROTTLE_BUCKET = 10 // 由于发送方是有突发的,需要累积一定时间做采样
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ThrottlingQueue

type ThrottlingQueue struct {
	Throttle int
	// contains filtered or unexported fields
}

func NewThrottlingQueue

func NewThrottlingQueue(throttle int, flowLogWriter *dbwriter.FlowLogWriter, index int) *ThrottlingQueue

func (*ThrottlingQueue) SendWithThrottling

func (thq *ThrottlingQueue) SendWithThrottling(flow interface{}) bool

func (*ThrottlingQueue) SendWithoutThrottling

func (thq *ThrottlingQueue) SendWithoutThrottling(flow interface{})

Jump to

Keyboard shortcuts

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