public

package
v0.0.0-...-869c34b Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfCircuitBreaker

func ConfCircuitBreaker(openStream bool)

ConfCircuitBreaker 设置熔断

Types

type FlowCountService

type FlowCountService struct {
	AppID       string        // 应用 ID
	Interval    time.Duration // 采集频率
	TotalCount  int64         // 当前总共请求数
	QPS         int64         // QPS
	Unix        int64         // 上次 unix 时间戳
	TickerCount int64         // 当前流量
}

FlowCountService 限流,数据、流量统计

func NewFlowCountService

func NewFlowCountService(appID string, interval time.Duration) (*FlowCountService, error)

NewFlowCountService description

func (*FlowCountService) Increase

func (o *FlowCountService) Increase()

Increase 原子增加

Jump to

Keyboard shortcuts

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