MCPcopy
hub / github.com/prometheus/prometheus / Decbuf

Struct Decbuf

tsdb/encoding/encoding.go:111–114  ·  view source on GitHub ↗

Decbuf provides safe methods to extract data from a byte slice. It does all necessary bounds checking and advancing of the byte slice. Several datums can be extracted without checking for errors. However, before using any datum, the err() method must be checked.

Source from the content-addressed store, hash-verified

109// Several datums can be extracted without checking for errors. However, before using
110// any datum, the err() method must be checked.
111type Decbuf struct {
112 B []byte
113 E error
114}
115
116// NewDecbufAt returns a new decoding buffer. It expects the first 4 bytes
117// after offset to hold the big endian encoded content length, followed by the contents and the expected

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected