resources

package
v0.14.0-rc1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 14 Imported by: 44

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Monitor

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

func NewMonitor

func NewMonitor() (*Monitor, error)

func (*Monitor) Close

func (m *Monitor) Close() error

func (*Monitor) RecordNamespace

func (m *Monitor) RecordNamespace(ns string, opt RecordOpt) (resourcestypes.Recorder, error)

type NetworkSampler

type NetworkSampler interface {
	Sample() (*resourcestypes.NetworkSample, error)
}

type RecordOpt

type RecordOpt struct {
	NetworkSampler NetworkSampler
}

type Sampler

type Sampler[T WithTimestamp] struct {
	// contains filtered or unexported fields
}

func NewSampler

func NewSampler[T WithTimestamp](minInterval time.Duration, maxSamples int, cb func(time.Time) (T, error)) *Sampler[T]

func NewSysSampler

func NewSysSampler() (*Sampler[*resourcestypes.SysSample], error)

func (*Sampler[T]) Close

func (s *Sampler[T]) Close() error

func (*Sampler[T]) Record

func (s *Sampler[T]) Record() *Sub[T]

type Sub

type Sub[T WithTimestamp] struct {
	// contains filtered or unexported fields
}

func (*Sub[T]) Close

func (s *Sub[T]) Close(captureLast bool) ([]T, error)

type SysSampler

type SysSampler = Sub[*resourcestypes.SysSample]

type WithTimestamp

type WithTimestamp interface {
	Timestamp() time.Time
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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