recorder

package
v0.0.0-...-868f543 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const MaxArchiveSize = 24 * 1024 * 1024

MaxArchiveSize defines maximum allowed tarball size

View Source
const MetadataRecordName = "insights-operator/gathers"

MetadataRecordName defines the metadata record name

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver interface {
	Save(record.MemoryRecords) (record.MemoryRecords, error)
	Prune(time.Time) error
}

Driver for the recorder

type FlushInterface

type FlushInterface interface {
	Interface
	Flush() error
}

FlushInterface extends Recorder by requiring flush

type Interface

type Interface interface {
	Record(record.Record) []error
}

Interface that defines the recorder

type MockRecorder

type MockRecorder struct {
	Records []record.Record
}

MockRecorder records everything to the field Records

func (*MockRecorder) Flush

func (*MockRecorder) Flush() error

func (*MockRecorder) Record

func (mr *MockRecorder) Record(r record.Record) []error

func (*MockRecorder) Reset

func (mr *MockRecorder) Reset()

type Recorder

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

Recorder struct

func New

func New(driver Driver, interval time.Duration, anonymizer *anonymization.Anonymizer) *Recorder

New recorder

func (*Recorder) Flush

func (r *Recorder) Flush() error

Flush and save the reports using recorder driver

func (*Recorder) PeriodicallyPrune

func (r *Recorder) PeriodicallyPrune(ctx context.Context, reported alreadyReported)

PeriodicallyPrune the reports using the recorder driver

func (*Recorder) Record

func (r *Recorder) Record(rec record.Record) (errs []error)

Record the report

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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