monitor

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultMetricsReportWindow .
	DefaultMetricsReportWindow = 1 * time.Minute
	// DefaultMetricsNumBuckets 。
	DefaultMetricsNumBuckets = 12
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MetricsReportWindow *time.Duration `yaml:"metricsReportWindow"`
	MetricsNumBuckets   int            `yaml:"metricsNumBuckets"`
}

Config 插件配置

func (*Config) GetBucketInterval

func (c *Config) GetBucketInterval() time.Duration

GetBucketInterval 获取滑桶数量

func (*Config) SetDefault

func (c *Config) SetDefault()

SetDefault 设置默认值

func (*Config) Verify

func (c *Config) Verify() error

Verify 校验配置

type Stat2MonitorReporter

type Stat2MonitorReporter struct {
	*plugin.PluginBase
	*common.RunContext
	// contains filtered or unexported fields
}

Stat2MonitorReporter 打印统计日志到本地文件中

func (*Stat2MonitorReporter) Destroy

func (g *Stat2MonitorReporter) Destroy() error

destroy

func (*Stat2MonitorReporter) Init

Init 初始化插件

func (*Stat2MonitorReporter) IsEnable

enable

func (*Stat2MonitorReporter) Name

func (s *Stat2MonitorReporter) Name() string

Name 插件名,一个类型下插件名唯一

func (*Stat2MonitorReporter) ReportStat

ReportStat 上报统计信息

func (*Stat2MonitorReporter) Start

func (g *Stat2MonitorReporter) Start() error

start 启动定时协程

func (*Stat2MonitorReporter) Type

func (s *Stat2MonitorReporter) Type() common.Type

Type 插件类型

type StatType

type StatType int

StatType 统计类型

Jump to

Keyboard shortcuts

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