model

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: AGPL-3.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

View Source
const CurrentEncoding = v1.Encoding

CurrentEncoding is a string representing the encoding that all new blocks should be created with

"" = tempopb.Trace
"v1" = tempopb.TraceBytes

Variables

View Source
var ObjectCombiner = objectCombiner{}

Functions

func CombineForRead added in v1.3.0

func CombineForRead(obj []byte, dataEncoding string, t *tempopb.Trace) (*tempopb.Trace, error)

CombineForRead is a convenience method used for combining while reading a trace. Due its use of PrepareForRead() it is a costly method and should not be called during any write or compaction operations.

Types

type Decoder added in v1.3.0

type Decoder interface {
	// PrepareForRead converts the byte slice into a tempopb.Trace for reading. This can be very expensive
	//  and should only be used when surfacing a byte slice from tempodb and preparing it for reads.
	PrepareForRead(obj []byte) (*tempopb.Trace, error)
	// Matches tests the passed byte slice and id to determine if it matches the criteria in tempopb.SearchRequest
	Matches(id []byte, obj []byte, req *tempopb.SearchRequest) (*tempopb.TraceSearchMetadata, error)
	// Combine combines the passed byte slice
	Combine(objs ...[]byte) ([]byte, error)
}

Decoder is used to work with opaque byte slices that contain trace data

func MustNewDecoder added in v1.3.0

func MustNewDecoder(dataEncoding string) Decoder

MustNewDecoder creates a new encoding or it panics

func NewDecoder added in v1.3.0

func NewDecoder(dataEncoding string) (Decoder, error)

NewDecoder returns a Decoder given the passed string.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳