cachetest

package
v0.61.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertArtifact

func AssertArtifact(t *testing.T, c cache.Cache, wantArtifact WantArtifact)

func AssertBlobs

func AssertBlobs(t *testing.T, c cache.Cache, wantBlobs []WantBlob)

func NewCache

func NewCache(t *testing.T, setUpCache func(t *testing.T) cache.Cache) cache.Cache

Types

type ErrorCache

type ErrorCache struct {
	*cache.MemoryCache
	// contains filtered or unexported fields
}

func NewErrorCache

func NewErrorCache(opts ErrorCacheOptions) *ErrorCache

func (*ErrorCache) GetArtifact

func (c *ErrorCache) GetArtifact(artifactID string) (types.ArtifactInfo, error)

func (*ErrorCache) GetBlob

func (c *ErrorCache) GetBlob(blobID string) (types.BlobInfo, error)

func (*ErrorCache) MissingBlobs

func (c *ErrorCache) MissingBlobs(artifactID string, blobIDs []string) (bool, []string, error)

func (*ErrorCache) PutArtifact

func (c *ErrorCache) PutArtifact(artifactID string, artifactInfo types.ArtifactInfo) error

func (*ErrorCache) PutBlob

func (c *ErrorCache) PutBlob(artifactID string, blobInfo types.BlobInfo) error

type ErrorCacheOptions

type ErrorCacheOptions struct {
	MissingBlobs bool
	PutArtifact  bool
	PutBlob      bool
	GetArtifact  bool
	GetBlob      bool
}

type WantArtifact

type WantArtifact struct {
	ID           string
	ArtifactInfo types.ArtifactInfo
}

type WantBlob

type WantBlob struct {
	ID       string
	BlobInfo types.BlobInfo
}

Jump to

Keyboard shortcuts

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