explore

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: Apache-2.0 Imports: 14 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, promRegistry prometheus.Registerer, log logrus.FieldLogger) *Explore

New create a new Explore

func (*Explore) ApplyConfig

func (e *Explore) ApplyConfig(cfg *prom.ConfigInfo) 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(hash uint64) *target.ScrapeStatus

Get return the target scrape status of the target by hash if target is never explored, it will be send to explore

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