v2

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Encoding = "v2"

Variables

This section is empty.

Functions

This section is empty.

Types

type ObjectDecoder

type ObjectDecoder struct {
}

func NewObjectDecoder

func NewObjectDecoder() *ObjectDecoder

ObjectDecoder translates between opaque byte slices and tempopb.Trace Object format:

| uint32 | uint32 | variable length               |
| start  | end    | marshalled tempopb.TraceBytes |

start and end are unix epoch seconds. The byte slices in tempopb.TraceBytes are marshalled tempopb.Trace's

func (*ObjectDecoder) Combine

func (d *ObjectDecoder) Combine(objs ...[]byte) ([]byte, error)

func (*ObjectDecoder) FastRange

func (d *ObjectDecoder) FastRange(buff []byte) (uint32, uint32, error)

func (*ObjectDecoder) Matches

func (d *ObjectDecoder) Matches(id []byte, obj []byte, req *tempopb.SearchRequest) (*tempopb.TraceSearchMetadata, error)

func (*ObjectDecoder) PrepareForRead

func (d *ObjectDecoder) PrepareForRead(obj []byte) (*tempopb.Trace, error)

type SegmentDecoder

type SegmentDecoder struct {
}

SegmentDecoder maintains the relationship between distributor -> ingester Segment format:

| uint32 | uint32 | variable length          |
| start  | end    | marshalled tempopb.Trace |

start and end are unix epoch seconds

func NewSegmentDecoder

func NewSegmentDecoder() *SegmentDecoder

func (*SegmentDecoder) FastRange

func (d *SegmentDecoder) FastRange(buff []byte) (uint32, uint32, error)

func (*SegmentDecoder) PrepareForRead

func (d *SegmentDecoder) PrepareForRead(segments [][]byte) (*tempopb.Trace, error)

func (*SegmentDecoder) PrepareForWrite

func (d *SegmentDecoder) PrepareForWrite(trace *tempopb.Trace, start uint32, end uint32) ([]byte, error)

func (*SegmentDecoder) ToObject

func (d *SegmentDecoder) ToObject(segments [][]byte) ([]byte, error)

ToObject creates a byte slice that can be interpreted by ObjectDecoder in this package see object_decoder.go for details on the format.

Jump to

Keyboard shortcuts

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