cache

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInCache

func NewInCache(db blob.Store) blob.Store

NewInCache returns a blob.Store that caches terminal blob records in front of db. It composes over any backing implementation.

Types

type Cache

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

Cache wraps a blob.Store, caching only blobs that have reached a terminal state (Ready or Rejected).

func (*Cache) Advance

func (c *Cache) Advance(ctx context.Context, id *blobpb.BlobId, to blob.State, image *blob.ImageMetadata) (bool, error)

func (*Cache) CreatePending

func (c *Cache) CreatePending(ctx context.Context, b *blob.Blob) error

func (*Cache) GetByID

func (c *Cache) GetByID(ctx context.Context, id *blobpb.BlobId) (*blob.Blob, error)

func (*Cache) GetByIDs

func (c *Cache) GetByIDs(ctx context.Context, ids []*blobpb.BlobId) ([]*blob.Blob, error)

func (*Cache) GetRenditions

func (c *Cache) GetRenditions(ctx context.Context, parentID *blobpb.BlobId) ([]*blob.Blob, error)

func (*Cache) Reject

func (c *Cache) Reject(ctx context.Context, id *blobpb.BlobId, rejection *blob.RejectionMetadata) (bool, error)

Jump to

Keyboard shortcuts

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