cache

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blob

type Blob struct {
	Digest   string   `dynamodbav:"Digest,string"`
	BlobPath []string `dynamodbav:"BlobPath,stringset"`
}

type BoltDBDriver

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

func (*BoltDBDriver) DeleteBlob

func (d *BoltDBDriver) DeleteBlob(digest godigest.Digest, path string) error

func (*BoltDBDriver) GetBlob

func (d *BoltDBDriver) GetBlob(digest godigest.Digest) (string, error)

func (*BoltDBDriver) HasBlob

func (d *BoltDBDriver) HasBlob(digest godigest.Digest, blob string) bool

func (*BoltDBDriver) Name

func (d *BoltDBDriver) Name() string

func (*BoltDBDriver) PutBlob

func (d *BoltDBDriver) PutBlob(digest godigest.Digest, path string) error

type BoltDBDriverParameters

type BoltDBDriverParameters struct {
	RootDir, Name string
	UseRelPaths   bool
}

type Cache

type Cache interface {
	// Returns the human-readable "name" of the driver.
	Name() string

	// Retrieves the blob matching provided digest.
	GetBlob(digest godigest.Digest) (string, error)

	// Uploads blob to cachedb.
	PutBlob(digest godigest.Digest, path string) error

	// Check if blob exists in cachedb.
	HasBlob(digest godigest.Digest, path string) bool

	// Delete a blob from the cachedb.
	DeleteBlob(digest godigest.Digest, path string) error
}

func NewBoltDBCache

func NewBoltDBCache(parameters interface{}, log zlog.Logger) Cache

func NewDynamoDBCache

func NewDynamoDBCache(parameters interface{}, log zlog.Logger) Cache

type DynamoDBDriver

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

func (*DynamoDBDriver) DeleteBlob

func (d *DynamoDBDriver) DeleteBlob(digest godigest.Digest, path string) error

func (*DynamoDBDriver) GetBlob

func (d *DynamoDBDriver) GetBlob(digest godigest.Digest) (string, error)

Returns the first path of the blob if it exists.

func (*DynamoDBDriver) HasBlob

func (d *DynamoDBDriver) HasBlob(digest godigest.Digest, path string) bool

func (*DynamoDBDriver) Name

func (d *DynamoDBDriver) Name() string

func (*DynamoDBDriver) NewTable

func (d *DynamoDBDriver) NewTable(tableName string) error

Use ONLY for tests.

func (*DynamoDBDriver) PutBlob

func (d *DynamoDBDriver) PutBlob(digest godigest.Digest, path string) error

type DynamoDBDriverParameters

type DynamoDBDriverParameters struct {
	Endpoint, Region, TableName string
}

Jump to

Keyboard shortcuts

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