explore

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Explore

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

Explore will explore Target before it assigned to Shard

func New

func New(scrapeManager *scrape.Manager, log logrus.FieldLogger) *Explore

New create a new Explore

func (*Explore) ApplyConfig

func (e *Explore) ApplyConfig(cfg *config.Config) error

ApplyConfig delete invalid job's targets according to config the new targets will be add by UpdateTargets

func (*Explore) Get

func (e *Explore) Get(job string, hash uint64) *target.ScrapeStatus

Get return the target scrape status of the target by hash

func (*Explore) Run

func (e *Explore) Run(ctx context.Context, con int) error

Run start Explore exploring engine every Target will be explore MaxExploreTime times "con" is the max worker goroutines

func (*Explore) UpdateTargets

func (e *Explore) UpdateTargets(targets map[string][]*discovery.SDTargets)

UpdateTargets update global target info, if target is new , it will send for exploring

Jump to

Keyboard shortcuts

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