collector

package
v0.0.0-...-5654eb1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CollectionType

type CollectionType int
const (
	CollectionSerial CollectionType = iota
	CollectionConcurrent
)

type Collector

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

func New

func New(opts ...Option) *Collector

func Start

func Start(opts ...Option) (*Collector, error)

func (*Collector) Start

func (c *Collector) Start(ctx context.Context) error

func (*Collector) Stop

func (c *Collector) Stop()

type Config

type Config struct {
	Quiet          bool
	CollectionType CollectionType
	// contains filtered or unexported fields
}

type FSStorageConfig

type FSStorageConfig struct {
	Dir string
}

type LogType

type LogType int
const (
	StdoutLog LogType = iota
	QuietLog
)

type Option

type Option func(c *Collector)

func CollectionMode

func CollectionMode(mode CollectionType) Option

func LogMode

func LogMode(mode LogType) Option

func WithBlockProfile

func WithBlockProfile(d time.Duration) Option

func WithCPUProfile

func WithCPUProfile(d time.Duration) Option

func WithGoroutineProfile

func WithGoroutineProfile() Option

func WithMemProfile

func WithMemProfile() Option

func WithStorageConf

func WithStorageConf(sc StorageConfig) Option

func WithTickInterval

func WithTickInterval(t time.Duration) Option

type ProfileConfig

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

type StorageConfig

type StorageConfig struct {
	FSStorageConfig FSStorageConfig
}

Jump to

Keyboard shortcuts

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