Documentation ¶
Index ¶
- Variables
- func AddMirrorConfiguration(ctx context.Context, fs afero.Fs, configPath string, ...) error
- func DetermineMediaType(b []byte) (string, error)
- func WalkImage(ctx context.Context, client Client, img Image) ([]string, error)
- type Client
- type Containerd
- func (c *Containerd) Client() (*containerd.Client, error)
- func (c *Containerd) GetBlob(ctx context.Context, dgst digest.Digest) (io.ReadSeekCloser, error)
- func (c *Containerd) GetManifest(ctx context.Context, dgst digest.Digest) ([]byte, string, error)
- func (c *Containerd) ListImages(ctx context.Context) ([]Image, error)
- func (c *Containerd) Name() string
- func (c *Containerd) Resolve(ctx context.Context, ref string) (digest.Digest, error)
- func (c *Containerd) Size(ctx context.Context, dgst digest.Digest) (int64, error)
- func (c *Containerd) Subscribe(ctx context.Context) (<-chan ImageEvent, <-chan error, error)
- func (c *Containerd) Verify(ctx context.Context) error
- type EventType
- type Image
- type ImageEvent
- type Memory
- func (m *Memory) AddBlob(b []byte, dgst digest.Digest)
- func (m *Memory) AddImage(img Image)
- func (m *Memory) GetBlob(ctx context.Context, dgst digest.Digest) (io.ReadSeekCloser, error)
- func (m *Memory) GetManifest(ctx context.Context, dgst digest.Digest) ([]byte, string, error)
- func (m *Memory) ListImages(ctx context.Context) ([]Image, error)
- func (m *Memory) Name() string
- func (m *Memory) Resolve(ctx context.Context, ref string) (digest.Digest, error)
- func (m *Memory) Size(ctx context.Context, dgst digest.Digest) (int64, error)
- func (m *Memory) Subscribe(ctx context.Context) (<-chan ImageEvent, <-chan error, error)
- func (m *Memory) Verify(ctx context.Context) error
- type Option
- type UnknownDocument
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("content not found")
)
Functions ¶
func AddMirrorConfiguration ¶
func AddMirrorConfiguration(ctx context.Context, fs afero.Fs, configPath string, registryURLs, mirrorURLs []url.URL, resolveTags, appendToBackup bool) error
Refer to containerd registry configuration documentation for more information about required configuration. https://github.com/containerd/containerd/blob/main/docs/cri/config.md#registry-configuration https://github.com/containerd/containerd/blob/main/docs/hosts.md#registry-configuration---examples
func DetermineMediaType ¶ added in v0.0.24
Types ¶
type Client ¶
type Client interface { // Name returns the name of the Client implementation. Name() string // Verify checks that all expected configuration is set. Verify(ctx context.Context) error // Subscribe will notify for any image events ocuring in the store backend. Subscribe(ctx context.Context) (<-chan ImageEvent, <-chan error, error) // ListImages returns a list of all local images. ListImages(ctx context.Context) ([]Image, error) // Resolve returns the digest for the tagged image name reference. // The ref is expected to be in the format `registry/name:tag`. Resolve(ctx context.Context, ref string) (digest.Digest, error) // Size returns the content byte size for the given digest. // Will return ErrNotFound if the digest cannot be found. Size(ctx context.Context, dgst digest.Digest) (int64, error) // GetManifest returns the manifest content for the given digest. // Will return ErrNotFound if the digest cannot be found. GetManifest(ctx context.Context, dgst digest.Digest) ([]byte, string, error) // GetBlob returns a stream of the blob content for the given digest. // Will return ErrNotFound if the digest cannot be found. GetBlob(ctx context.Context, dgst digest.Digest) (io.ReadSeekCloser, error) }
type Containerd ¶
type Containerd struct {
// contains filtered or unexported fields
}
func NewContainerd ¶
func (*Containerd) Client ¶
func (c *Containerd) Client() (*containerd.Client, error)
func (*Containerd) GetBlob ¶
func (c *Containerd) GetBlob(ctx context.Context, dgst digest.Digest) (io.ReadSeekCloser, error)
func (*Containerd) GetManifest ¶
func (*Containerd) ListImages ¶
func (c *Containerd) ListImages(ctx context.Context) ([]Image, error)
func (*Containerd) Name ¶
func (c *Containerd) Name() string
func (*Containerd) Resolve ¶
func (c *Containerd) Resolve(ctx context.Context, ref string) (digest.Digest, error)
func (*Containerd) Size ¶
func (c *Containerd) Size(ctx context.Context, dgst digest.Digest) (int64, error)
func (*Containerd) Subscribe ¶
func (c *Containerd) Subscribe(ctx context.Context) (<-chan ImageEvent, <-chan error, error)
type ImageEvent ¶
type Memory ¶ added in v0.0.24
type Memory struct {
// contains filtered or unexported fields
}
func (*Memory) GetManifest ¶ added in v0.0.24
func (*Memory) ListImages ¶ added in v0.0.24
type Option ¶ added in v0.0.22
type Option func(*Containerd)
func WithContentPath ¶ added in v0.0.22
type UnknownDocument ¶
type UnknownDocument struct { MediaType string `json:"mediaType"` specs.Versioned }
Click to show internal directories.
Click to hide internal directories.