Documentation ¶
Index ¶
- Constants
- func Set(ctx context.Context, source, target ocispec.Descriptor)
- type Item
- type Provider
- type RemoteCache
- func Get(ctx context.Context, dgst digest.Digest) (*RemoteCache, *ocispec.Descriptor)
- func New(ctx context.Context, ref, version string, size int, pvd Provider) (context.Context, *RemoteCache)
- func Update(ctx context.Context, dgst digest.Digest, labels map[string]string) (*RemoteCache, *ocispec.Descriptor)
- func (rc *RemoteCache) Fetch(ctx context.Context, platformMC platforms.MatchComparer) (*ocispec.Descriptor, error)
- func (rc *RemoteCache) HitCount(ctx context.Context, desc ocispec.Descriptor, platform platforms.MatchComparer) (uint, uint, error)
- func (rc *RemoteCache) Push(ctx context.Context, orgDesc, newDesc *ocispec.Descriptor, ...) error
Constants ¶
View Source
const LayerAnnotationCacheVersion = "containerd.io/snapshot/nydus-cache-version"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Item ¶
type Item struct { Source ocispec.Descriptor Target ocispec.Descriptor }
type RemoteCache ¶
type RemoteCache struct { // ref is the reference of cache manifest in remote registry. Ref string // contains filtered or unexported fields }
RemoteCache manages the map of source and target layer after conversion, it's local records of the remote cache manifest.
func Get ¶
func Get(ctx context.Context, dgst digest.Digest) (*RemoteCache, *ocispec.Descriptor)
func Update ¶
func Update(ctx context.Context, dgst digest.Digest, labels map[string]string) (*RemoteCache, *ocispec.Descriptor)
func (*RemoteCache) Fetch ¶
func (rc *RemoteCache) Fetch(ctx context.Context, platformMC platforms.MatchComparer) (*ocispec.Descriptor, error)
Fetch fetchs cache manifest from remote registry.
func (*RemoteCache) HitCount ¶ added in v0.2.12
func (rc *RemoteCache) HitCount(ctx context.Context, desc ocispec.Descriptor, platform platforms.MatchComparer) (uint, uint, error)
HitCount returns the hitted and total count of cache layers in a conversion.
func (*RemoteCache) Push ¶
func (rc *RemoteCache) Push(ctx context.Context, orgDesc, newDesc *ocispec.Descriptor, platformMC platforms.MatchComparer) error
Push merges local and remote cache records, then push cache manifest to remote registry.
Click to show internal directories.
Click to hide internal directories.