Documentation
¶
Index ¶
- Variables
- type SpanManager
- func (m *SpanManager) Close()
- func (m *SpanManager) EnableHotCache(maxEntries int)
- func (m *SpanManager) FetchSingleSpan(spanID compression.SpanID) error
- func (m *SpanManager) GetContents(startUncompOffset, endUncompOffset compression.Offset) (io.ReadCloser, error)
- func (m *SpanManager) ResolveSpan(spanID compression.SpanID) error
- func (m *SpanManager) ResolveSpanRange(startUncompOffset, endUncompOffset compression.Offset, maxSpans int) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrSpanNotAvailable = errors.New("span not available in cache") ErrIncorrectSpanDigest = errors.New("span digests do not match") ErrExceedMaxSpan = errors.New("span id larger than max span id") ErrIncorrectMaxSpanID = errors.New("given max span ID differs from calculated max span ID") )
Specific error types raised by SpanManager.
Functions ¶
This section is empty.
Types ¶
type SpanManager ¶
type SpanManager struct {
// contains filtered or unexported fields
}
SpanManager fetches and caches spans of a given layer.
func (*SpanManager) Close ¶
func (m *SpanManager) Close()
Close closes both the underlying zinfo data and blob cache.
func (*SpanManager) EnableHotCache ¶
func (m *SpanManager) EnableHotCache(maxEntries int)
EnableHotCache keeps a bounded set of uncompressed spans in memory. It is intended for startup profiles that synchronously pre-resolve a small hot set and then immediately serve many small reads from those same spans.
func (*SpanManager) FetchSingleSpan ¶
func (m *SpanManager) FetchSingleSpan(spanID compression.SpanID) error
FetchSingleSpan invokes the reader to fetch the span in the background and cache the span without uncompressing. It is invoked by the BackgroundFetcher. span state change: unrequested -> requested -> fetched.
func (*SpanManager) GetContents ¶
func (m *SpanManager) GetContents(startUncompOffset, endUncompOffset compression.Offset) (io.ReadCloser, error)
GetContents returns a reader for the requested contents. The contents may be across multiple spans.
func (*SpanManager) ResolveSpan ¶
func (m *SpanManager) ResolveSpan(spanID compression.SpanID) error
ResolveSpan ensures the span exists in cache and is uncompressed by using a safer approach that directly fetches and caches the span without calling getSpanContent.
func (*SpanManager) ResolveSpanRange ¶
func (m *SpanManager) ResolveSpanRange(startUncompOffset, endUncompOffset compression.Offset, maxSpans int) error