Documentation
¶
Overview ¶
Copyright (c) Microsoft Corporation. Licensed under the MIT License.
Copyright (c) Microsoft Corporation. Licensed under the MIT License.
Index ¶
Constants ¶
View Source
const ( // DefaultSock is the default containerd socket path. DefaultSock = "/run/containerd/containerd.sock" // DefaultNamespace is the default containerd namespace for this client. DefaultNamespace = "k8s.io" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reference ¶
type Reference interface {
// Name is the name of the artifact.
Name() string
// Digest is the digest of the artifact.
Digest() digest.Digest
// Tag is the tag of the artifact.
Tag() string
// Repository is the repository of the artifact.
Repository() string
// Host is the host of the artifact.
Host() string
// String returns the string representation of the reference.
// docker.io/library/ubuntu:latest
// docker.io/library/ubuntu@sha256:abcdef
String() string
}
Reference is a reference to an OCI artifact in the content store.
type Store ¶
type Store interface {
// Subscribe returns a channel of artifacts and a channel of errors.
// Artifacts are sent on the channel as they are discovered.
Subscribe(ctx context.Context) (<-chan Reference, <-chan error)
// List returns a list of artifacts.
List(ctx context.Context) ([]Reference, error)
// Resolve returns the digest for an existing artifact.
Resolve(ctx context.Context, ref string) (digest.Digest, error)
// Size returns the size of the artifact.
Size(ctx context.Context, dgst digest.Digest) (int64, error)
// Bytes returns the artifact bytes.
Bytes(ctx context.Context, dgst digest.Digest) ([]byte, string, error)
// Write writes the artifact bytes to the writer.
Write(ctx context.Context, dst io.Writer, dgst digest.Digest) error
// Verify will verify that the client status is healthy.
Verify(ctx context.Context) error
// All returns a list of digests of all resources referenced in ref.
All(ctx context.Context, ref Reference) ([]string, error)
}
Store is the interface for all containerd content store artifacts.
func NewDefaultStore ¶
NewDefaultStore creates a new Store with default values for containerd socket, namespace and hosts configuration path.
Click to show internal directories.
Click to hide internal directories.