Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct {
// contains filtered or unexported fields
}
Entry is used to keep track of tag slices shared by the contexts.
func (*Entry) DataSizeInBytes ¶
DataSizeInBytes returns the size of the Entry data in bytes.
func (*Entry) Release ¶
func (e *Entry) Release()
Release decrements internal reference counter, potentially marking the entry as unused.
Can be called concurrently with other store operations.
func (*Entry) SizeInBytes ¶
SizeInBytes returns the size of the Entry in bytes.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store is a reference counted container of tags slices, to be shared between contexts.
Store is generally not thread-safe, except Release may be called concurrently with other methods.
func (*Store) Insert ¶
Insert returns an Entry that corresponds to the key. If the key is not in the cache, a new entry is stored in the Store with the tags retrieved from the tagsBuffer. Insert increments reference count for the returned entry; callers should call Entry.Release() when the returned pointer is no longer in use.
Store is generally not thread-safe, except Release may be called concurrently with other methods.