Documentation ¶
Overview ¶
Package daemon provides facilities for reading/writing v1.Image from/to a running daemon.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Image ¶
Image provides access to an image reference from the Docker daemon, applying functional options to the underlying imageOpener before resolving the reference into a v1.Image.
Types ¶
type Client ¶
type Client interface { NegotiateAPIVersion(ctx context.Context) ImageSave(context.Context, []string) (io.ReadCloser, error) ImageLoad(context.Context, io.Reader, bool) (types.ImageLoadResponse, error) ImageTag(context.Context, string, string) error ImageInspectWithRaw(context.Context, string) (types.ImageInspect, []byte, error) }
Client represents the subset of a docker client that the daemon package uses.
type ImageOption ¶
type ImageOption Option
ImageOption is an alias for Option. Deprecated: Use Option instead.
type Option ¶ added in v0.5.0
type Option func(*options)
Option is a functional option for daemon operations.
func WithClient ¶
WithClient is a functional option to allow injecting a docker client.
By default, github.com/docker/docker/client.FromEnv is used.
func WithContext ¶ added in v0.5.0
WithContext is a functional option to pass through a context.Context.
By default, context.Background() is used.
func WithUnbufferedOpener ¶
func WithUnbufferedOpener() Option
WithUnbufferedOpener streams the image to avoid buffering.