redis

package
v0.0.0-...-cc6ace1 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CachedManager

type CachedManager interface {
	// ManifestManager is the Manager for manifest.
	ManifestManager
	// Manager is the common interface for resource cache.
	cached.Manager
}

CachedManager is the interface combines raw resource Manager and cached Manager for better extension.

type Manager

type Manager struct {
	*cached.BaseManager
	// contains filtered or unexported fields
}

Manager is the cached manager implemented by redis.

func NewManager

func NewManager() *Manager

NewManager returns the redis cache manager.

func (*Manager) Delete

func (m *Manager) Delete(ctx context.Context, digest string) error

func (*Manager) Get

func (m *Manager) Get(ctx context.Context, digest string) ([]byte, error)

func (*Manager) Save

func (m *Manager) Save(ctx context.Context, digest string, manifest []byte) error

type ManifestManager

type ManifestManager interface {
	// Save manifest to cache.
	Save(ctx context.Context, digest string, manifest []byte) error
	// Get manifest from cache.
	Get(ctx context.Context, digest string) ([]byte, error)
	// Delete manifest from cache.
	Delete(ctx context.Context, digest string) error
}

ManifestManager is the Manager for manifest.

Jump to

Keyboard shortcuts

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