Documentation
¶
Index ¶
- func NewMockLocal(clock clock.Clock) spancache.Cache
- type Local
- func (cache *Local) Close(ctx context.Context) error
- func (cache *Local) Fetch(ctx context.Context, key string) (*spancache.Entry, error)
- func (cache *Local) FetchOrReserve(ctx context.Context, key string, ttl time.Duration) (*spancache.Entry, error)
- func (cache *Local) Init() error
- func (_ *Local) MuxImplName() (name string, isDefault bool)
- func (cache *Local) Options() manager.Options
- func (cache *Local) SetReserved(ctx context.Context, key string, value []byte, lastUid spancache.Uid, ...) error
- func (cache *Local) Start(ctx context.Context) error
- func (cache *Local) Trim()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Local ¶
type Local struct { manager.MuxImplBase Logger logrus.FieldLogger Clock clock.Clock // contains filtered or unexported fields }
A basic implementation of Cache in memory that satisfies its requirements. Used for unit testing and installations who don't want to setup an external database.
func (*Local) FetchOrReserve ¶
func (*Local) MuxImplName ¶
func (*Local) SetReserved ¶
Click to show internal directories.
Click to hide internal directories.