Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeNamed ¶ added in v0.2.0
Normalize the name accord the spec of docker, It may support normalize imagea and container in the future.
Types ¶
type Client ¶
type Client interface { // Load loads the image from the reader to the docker host. Load(ctx context.Context, r io.ReadCloser, quiet bool) error // StartEnvd creates the container for the given tag and container name. StartEnvd(ctx context.Context, tag, name, buildContext string, gpuEnabled bool, numGPUs int, sshPort int, g ir.Graph, timeout time.Duration, mountOptionsStr []string) (string, string, error) StartBuildkitd(ctx context.Context, tag, name, mirror string) (string, error) CleanEnvdIfExists(ctx context.Context, name string, force bool) error IsRunning(ctx context.Context, name string) (bool, error) Exists(ctx context.Context, name string) (bool, error) WaitUntilRunning(ctx context.Context, name string, timeout time.Duration) error Exec(ctx context.Context, cname string, cmd []string) error Destroy(ctx context.Context, name string) (string, error) ListContainer(ctx context.Context) ([]types.Container, error) GetContainer(ctx context.Context, cname string) (types.ContainerJSON, error) PauseContainer(ctx context.Context, name string) (string, error) ResumeContainer(ctx context.Context, name string) (string, error) ListImage(ctx context.Context) ([]types.ImageSummary, error) GetImage(ctx context.Context, image string) (types.ImageSummary, error) GetImageWithCacheHashLabel(ctx context.Context, image string, hash string) (types.ImageSummary, error) RemoveImage(ctx context.Context, image string) error GetInfo(ctx context.Context) (types.Info, error) // GPUEnabled returns true if nvidia container runtime exists in docker daemon. GPUEnabled(ctx context.Context) (bool, error) }
Click to show internal directories.
Click to hide internal directories.