resources

package
v1.1.10 Latest Latest
Warning

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

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

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) (types.Recorder, error)

type NetworkSampler

type NetworkSampler interface {
	Sample() (*network.Sample, 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[*types.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[*types.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