Help us shape the future of Go! Take the 2026 Go Developer Survey

target

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	// Targets is a list of targets identified by a label set. Each target is
	// uniquely identifiable in the group by its address label.
	Targets []model.LabelSet
	// Labels is a set of labels that is common across all targets in the group.
	Labels model.LabelSet

	// Source is an identifier that describes a group of targets.
	Source string
}

Group is a set of targets with a common label set(production , test, staging etc.).

func (Group) String

func (tg Group) String() string

type Manager

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

func NewManager

func NewManager(
	logger log.Logger,
	reg prometheus.Registerer,
	writeClient profilestorepb.ProfileStoreServiceClient,
	debugInfoClient debuginfo.Client,
	profilingDuration time.Duration,
	externalLabels model.LabelSet,
	samplingRatio float64,
	tmp string,
) *Manager

func (*Manager) ActiveProfilers

func (m *Manager) ActiveProfilers() map[string][]Profiler

func (*Manager) Run

func (m *Manager) Run(ctx context.Context, update <-chan map[string][]*Group) error

type Profiler

type Profiler interface {
	Labels() model.LabelSet
	LastProfileTakenAt() time.Time
	LastError() error
	Stop()
}

type ProfilerPool

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

func NewProfilerPool

func NewProfilerPool(
	ctx context.Context,
	logger log.Logger,
	reg prometheus.Registerer,
	ksymCache *ksym.Cache,
	objCache objectfile.Cache,
	writeClient profilestorepb.ProfileStoreServiceClient,
	debugInfoClient debuginfo.Client,
	profilingDuration time.Duration,
	externalLabels model.LabelSet,
	samplingRatio float64,
	tmp string,
) *ProfilerPool

func (*ProfilerPool) Profilers

func (pp *ProfilerPool) Profilers() []Profiler

func (*ProfilerPool) Sync

func (pp *ProfilerPool) Sync(tg []*Group)

type Target

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

Jump to

Keyboard shortcuts

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