ingestion

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsIngestionError

func IsIngestionError(err error) bool

Types

type Error

type Error struct{ Err error }

func (Error) Error

func (e Error) Error() string

func (Error) Unwrap

func (e Error) Unwrap() error

type Format

type Format string
const (
	FormatPprof  Format = "pprof"
	FormatJFR    Format = "jfr"
	FormatTrie   Format = "trie"
	FormatTree   Format = "tree"
	FormatLines  Format = "lines"
	FormatGroups Format = "groups"
)

type IngestInput

type IngestInput struct {
	Format   Format
	Profile  RawProfile
	Metadata Metadata
}

type Ingester

type Ingester interface {
	Ingest(context.Context, *IngestInput) error
}

type Metadata

type Metadata struct {
	StartTime       time.Time
	EndTime         time.Time
	Key             *segment.Key
	SpyName         string
	SampleRate      uint32
	Units           metadata.Units
	AggregationType metadata.AggregationType
}

type NoopIngester added in v0.22.1

type NoopIngester struct{}

func NewNoopIngester added in v0.22.1

func NewNoopIngester() *NoopIngester

func (*NoopIngester) Ingest added in v0.22.1

func (*NoopIngester) Ingest(_ context.Context, _ *IngestInput) error

type Parallelizer

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

func NewParallelizer

func NewParallelizer(log *logrus.Logger, ingesters ...Ingester) *Parallelizer

func (*Parallelizer) Ingest

func (p *Parallelizer) Ingest(ctx context.Context, in *IngestInput) error

type RawProfile

type RawProfile interface {
	Parse(context.Context, storage.Putter, storage.MetricsExporter, Metadata) error
	Bytes() ([]byte, error)
	// ContentType denotes Bytes output type. Must be only called after Bytes.
	ContentType() string
}

Jump to

Keyboard shortcuts

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