collector

package
v0.0.0-...-e621399 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultItvl = xtime.Duration(3 * time.Second)
)

Variables

This section is empty.

Functions

func FireCollectors

func FireCollectors(collectors ...Collector)

Types

type Collector

type Collector interface {
	Init(opts ...Option) error
	Collect() error
	Stop()
	ReCollect(opts ...Option) error
	Options() Options
	String() string
}

type Option

type Option func(o *Options)

func Dao

func Dao(d *dao.Dao) Option

func DiscoveryConf

func DiscoveryConf(dis *naming.Config) Option

func Interval

func Interval(itvl xtime.Duration) Option

type Options

type Options struct {
	Discovery *naming.Config
	Itvl      xtime.Duration
	Dao       *dao.Dao
	Context   context.Context
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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