tablestat

package
v0.0.0-...-5c7ffcf Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultManager = NewTableStatManger(31)

Functions

func Add

func Add(table string, key string, value int64)

Types

type AddItem

type AddItem struct {
	// contains filtered or unexported fields
}

type ReportResult

type ReportResult struct {
	TableMetrics map[string]map[string]int64
}

type Reporter

type Reporter interface {
	Report(ReportResult)
}

type TableEntry

type TableEntry struct {
	// contains filtered or unexported fields
}

type TableStatManger

type TableStatManger struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewTableStatManger

func NewTableStatManger(printSecond int) *TableStatManger

func (*TableStatManger) Add

func (m *TableStatManger) Add(table string, key string, value int64)

虽然这个接口具备合并能力, 但可以的话还是可以在上层减少调用量

func (*TableStatManger) Max

func (m *TableStatManger) Max(table string, key string, value int64)

func (*TableStatManger) RegisterReporter

func (m *TableStatManger) RegisterReporter(r Reporter)

func (*TableStatManger) Start

func (m *TableStatManger) Start()

Jump to

Keyboard shortcuts

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