serviceinfo

package
v1.2.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 3 more Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoRecoverAll uint32 = 0
	RecoverAll   uint32 = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ReportInterval *time.Duration `yaml:"reportInterval"`
}

Config 上报缓存信息插件的配置

func (*Config) SetDefault

func (c *Config) SetDefault()

SetDefault 设置默认配置值

func (*Config) Verify

func (c *Config) Verify() error

Verify 校验配置

type Reporter

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

Reporter 上报缓存信息的插件

func (*Reporter) Destroy

func (s *Reporter) Destroy() error

Destroy 解决匿名组合中该函数二义性问题

func (*Reporter) Info

func (s *Reporter) Info() model.StatInfo

func (*Reporter) Init

func (s *Reporter) Init(ctx *plugin.InitContext) error

Init 初始化

func (*Reporter) IsEnable

func (s *Reporter) IsEnable(cfg sysconfig.Configuration) bool

IsEnable enable

func (*Reporter) Name

func (s *Reporter) Name() string

Name 插件名称

func (*Reporter) ReportStat

func (s *Reporter) ReportStat(t model.MetricType, info model.InstanceGauge) error

ReportStat 这个插件不实现ReportStat接口,按照服务变化来收集统计信息

func (*Reporter) Start

func (s *Reporter) Start() error

Start 启动上报协程

func (*Reporter) Type

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

Type 插件类型

Jump to

Keyboard shortcuts

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