agent

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

Types

type CgroupProfiler

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

func NewCgroupProfiler

func NewCgroupProfiler(
	logger log.Logger,
	externalLabels map[string]string,
	ksymCache *ksym.KsymCache,
	writeClient profilestorepb.ProfileStoreServiceClient,
	debugInfoClient debuginfo.Client,
	target CgroupProfilingTarget,
	sink func(Record),
	tmp string,
) *CgroupProfiler

func (*CgroupProfiler) Labels

func (p *CgroupProfiler) Labels() []*profilestorepb.Label

func (*CgroupProfiler) LastError

func (p *CgroupProfiler) LastError() error

func (*CgroupProfiler) LastProfileTakenAt

func (p *CgroupProfiler) LastProfileTakenAt() time.Time

func (*CgroupProfiler) Run

func (p *CgroupProfiler) Run(ctx context.Context) error

func (*CgroupProfiler) Stop

func (p *CgroupProfiler) Stop()

type CgroupProfilingTarget

type CgroupProfilingTarget interface {
	PerfEventCgroupPath() string
	Labels() []*profilestorepb.Label
}

type NoopProfileStoreClient

type NoopProfileStoreClient struct{}

func (*NoopProfileStoreClient) WriteRaw

type PodManager

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

func NewPodManager

func NewPodManager(
	logger log.Logger,
	externalLabels map[string]string,
	nodeName string,
	podLabelSelector string,
	samplingRatio float64,
	ksymCache *ksym.KsymCache,
	writeClient profilestorepb.ProfileStoreServiceClient,
	debugInfoClient debuginfo.Client,
	tmp string,
	socketPath string,
) (*PodManager, error)

func (*PodManager) ActiveProfilers

func (m *PodManager) ActiveProfilers() []Profiler

func (*PodManager) Run

func (g *PodManager) Run(ctx context.Context) error

func (*PodManager) SetSink

func (g *PodManager) SetSink(sink func(Record))

type Profiler

type Profiler interface {
	Labels() []*profilestorepb.Label
	LastProfileTakenAt() time.Time
	LastError() error
}

type Record

type Record struct {
	Labels  []*profilestorepb.Label
	Profile *profile.Profile
}

type SystemdManager

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

func NewSystemdManager

func NewSystemdManager(
	logger log.Logger,
	nodeName string,
	units []string,
	samplingRatio float64,
	externalLabels map[string]string,
	ksymCache *ksym.KsymCache,
	writeClient profilestorepb.ProfileStoreServiceClient,
	debugInfoClient debuginfo.Client,
	tmp string,
) *SystemdManager

func (*SystemdManager) ActiveProfilers

func (m *SystemdManager) ActiveProfilers() []Profiler

func (*SystemdManager) Run

func (m *SystemdManager) Run(ctx context.Context) error

func (*SystemdManager) SetSink

func (m *SystemdManager) SetSink(sink func(Record))

type SystemdUnitTarget

type SystemdUnitTarget struct {
	Name     string
	NodeName string
}

func (*SystemdUnitTarget) Labels

func (t *SystemdUnitTarget) Labels() []*profilestorepb.Label

func (*SystemdUnitTarget) PerfEventCgroupPath

func (t *SystemdUnitTarget) PerfEventCgroupPath() string

type TargetManager

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

func NewTargetManager

func NewTargetManager(sources []TargetSource) *TargetManager

func (*TargetManager) ActiveProfilers

func (m *TargetManager) ActiveProfilers() []Profiler

func (*TargetManager) NextMatchingProfile

func (m *TargetManager) NextMatchingProfile(ctx context.Context, matchers []*labels.Matcher) (*profile.Profile, error)

func (*TargetManager) Observe

func (m *TargetManager) Observe(f func(Record)) *observer

func (*TargetManager) ObserveProfile

func (m *TargetManager) ObserveProfile(r Record)

func (*TargetManager) RemoveObserver

func (m *TargetManager) RemoveObserver(o *observer)

type TargetSource

type TargetSource interface {
	SetSink(func(Record))
	ActiveProfilers() []Profiler
}

Jump to

Keyboard shortcuts

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