cockroach: github.com/cockroachdb/cockroach/pkg/kv/kvserver/protectedts/ptcache Index | Files

package ptcache

import "github.com/cockroachdb/cockroach/pkg/kv/kvserver/protectedts/ptcache"

Index

Package Files

cache.go

type Cache Uses

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

Cache implements protectedts.Cache.

func New Uses

func New(config Config) *Cache

New returns a new cache.

func (*Cache) Iterate Uses

func (c *Cache) Iterate(
    _ context.Context, from, to roachpb.Key, it protectedts.Iterator,
) (asOf hlc.Timestamp)

Iterate is part of the protectedts.Cache interface.

func (*Cache) QueryRecord Uses

func (c *Cache) QueryRecord(_ context.Context, id uuid.UUID) (exists bool, asOf hlc.Timestamp)

QueryRecord is part of the protectedts.Cache interface.

func (*Cache) Refresh Uses

func (c *Cache) Refresh(ctx context.Context, asOf hlc.Timestamp) error

Refresh is part of the protectedts.Cache interface.

func (*Cache) Start Uses

func (c *Cache) Start(ctx context.Context, stopper *stop.Stopper) error

Start starts the periodic fetching of the Cache. A Cache must not be used until after it has been started. An error will be returned if it has already been started.

type Config Uses

type Config struct {
    DB       *kv.DB
    Storage  protectedts.Storage
    Settings *cluster.Settings
}

Config configures a Cache.

Package ptcache imports 15 packages (graph) and is imported by 2 packages. Updated 2020-06-02. Refresh now. Tools for package owners.