kv

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const UnsymbolizedLocationLinesKeyPrefix = "v1/unsymbolized-locations/by-key/"

Unsymbolized locations are namespaced by their mapping ID. `v1/unsymbolized-locations/by-key/<hashed-mapping-key>/<hashed-location-key>`.

Variables

This section is empty.

Functions

func FunctionIDFromKey

func FunctionIDFromKey(key string) string

FunctionIDFromKey returns the function ID portion of the provided key.

func LocationIDFromKey

func LocationIDFromKey(key string) string

LocationIDFromKey returns the location ID portion of the provided key.

func LocationIDFromUnsymbolizedKey

func LocationIDFromUnsymbolizedKey(key string) string

LocationIDFromUnsymbolizedKey returns the location ID portion of the provided key.

func MakeFunctionKeyWithID

func MakeFunctionKeyWithID(functionID string) string

MakeFunctionKeyWithID returns the key to be used to store/lookup a function with the provided ID in a key-value store.

func MakeLocationKeyWithID

func MakeLocationKeyWithID(locationID string) string

MakeLocationKeyWithID returns the key to be used to store/lookup a location with the provided ID in a key-value store.

func MakeMappingKeyWithID

func MakeMappingKeyWithID(mappingID string) string

MakeMappingKeyWithID returns the key to be used to store/lookup a mapping with the provided ID in a key-value store.

func MakeStacktraceKeyWithID

func MakeStacktraceKeyWithID(stacktraceID string) string

MakeStacktraceKeyWithID returns the key to be used to store/lookup a mapping with the provided ID in a key-value store.

func MakeUnsymbolizedLocationKeyWithID

func MakeUnsymbolizedLocationKeyWithID(locationID string) string

MakeUnsymbolizedLocationKeyWithID returns the key to be used to store/lookup an unsymbolized location.

func MappingIDFromKey

func MappingIDFromKey(key string) string

MappingIDFromKey returns the mapping ID portion of the provided key.

func StacktraceIDFromKey

func StacktraceIDFromKey(key string) string

StacktraceIDFromKey returns the mapping ID portion of the provided key.

Types

type KeyMaker

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

KeyMaker is responsible for creating keys used in BadgerMetastore.

func NewKeyMaker

func NewKeyMaker() *KeyMaker

func (*KeyMaker) MakeFunctionID

func (m *KeyMaker) MakeFunctionID(f *pb.Function) string

MakeFunctionID returns a key for the function. Functions are uniquely identified by their name, filename, starting line number and system name.

func (*KeyMaker) MakeFunctionKey

func (m *KeyMaker) MakeFunctionKey(f *pb.Function) string

MakeFunctionKey returns the key to be used to store/lookup the function in a key-value store.

func (*KeyMaker) MakeLocationID

func (m *KeyMaker) MakeLocationID(l *pb.Location) string

MakeLocationID returns a key for the location that uniquely identifies the location. Locations are uniquely identified by their mapping ID and their address and whether the address is folded. If a location address is 0, then the lines are expected to be non empty and to be already resolved as they cannot be asynchronously symbolized. The lines are then taken into the location key.

func (*KeyMaker) MakeLocationKey

func (m *KeyMaker) MakeLocationKey(l *pb.Location) string

MakeLocationKey returns the key to be used to store/lookup the location in a key-value store.

func (*KeyMaker) MakeMappingID

func (m *KeyMaker) MakeMappingID(mp *pb.Mapping) string

MakeMappingID returns a key for the mapping. Mappings are uniquely identified by their build id (or file if build id is not available), their size, and offset.

func (*KeyMaker) MakeMappingKey

func (m *KeyMaker) MakeMappingKey(mp *pb.Mapping) string

MakeMappingKey returns the key to be used to store/lookup the mapping in a key-value store.

func (*KeyMaker) MakeProfileLocationID

func (m *KeyMaker) MakeProfileLocationID(l *profile.Location) string

func (*KeyMaker) MakeStacktraceID

func (m *KeyMaker) MakeStacktraceID(s *pb.Stacktrace) string

MakeStacktraceID returns a key for the stacktrace. Stacktraces are uniquely identified by their unique combination and order of locations.

func (*KeyMaker) MakeStacktraceKey

func (m *KeyMaker) MakeStacktraceKey(s *pb.Stacktrace) string

MakeStacktraceKey returns the key to be used to store/lookup the mapping in a key-value store.

Jump to

Keyboard shortcuts

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