Versions in this module Expand all Collapse all v0 v0.1.1 Mar 7, 2022 v0.1.0 Jan 4, 2022 Changes in this version + const EnvPprofDir + const EnvPprofPrefix + const EnvPprofTtl + var ErrAlreadyEnabled = errors.New("already enabled") + var ErrInvalidOption = errors.New("invalid option") + func BlockProfile() blockProfile + func CpuProfile() cpuProfile + func EnableCapture(options ...Option) error + func GoroutineProfile() goroutineProfile + func HeapProfile() heapProfile + func MutexProfile() mutexProfile + func ThreadcreateProfile() threadcreateProfile + type FileStorage struct + func NewFileStorage(prefix, dir string, ttl time.Duration) *FileStorage + func NewFileStorageFromEnv() *FileStorage + func (s *FileStorage) WriteCloser(name string, t time.Time) (io.WriteCloser, error) + type IntervalTrigger struct + func NewIntervalTrigger(interval time.Duration) *IntervalTrigger + func (t *IntervalTrigger) Wait() error + type Logger interface + Printf func(format string, v ...interface{}) + type Option func(c *capturer) + func WithLogger(logger Logger) Option + func WithProfiles(profiles ...profile) Option + func WithStorage(storage Storage) Option + func WithTrigger(trigger Trigger) Option + type RandomIntervalTrigger struct + func NewRandomIntervalTrigger(min, max time.Duration) *RandomIntervalTrigger + func (t *RandomIntervalTrigger) Wait() error + type Storage interface + WriteCloser func(name string, t time.Time) (io.WriteCloser, error) + type Trigger interface + Wait func() error