docker_api

package
v1.2.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package docker_api

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(hostURL, version string) (*Client, error)

func (*Client) CreateImageTag added in v1.1.3

func (c *Client) CreateImageTag(toAbsRefStr, fromAbsRefStr string) (io.ReadCloser, error)

func (*Client) ExportContainer added in v1.1.4

func (c *Client) ExportContainer(containerID string) (io.ReadCloser, error)

func (*Client) ExportImage added in v1.1.3

func (c *Client) ExportImage(absRefStr string) (io.ReadCloser, error)

ExportImage +param absRefStr (1). absolutely reference string for registry/project/repository/artifact/name:tag +desc

(1).if image do not exist in docker host local, pull image to local

(2).get image id by absRefStr

(3).save image to docker host local get io.ReadCloser fd

func (*Client) GC added in v1.1.4

func (c *Client) GC(gcFn ...util.Func)

func (*Client) HostImageStorageGC added in v1.1.4

func (c *Client) HostImageStorageGC(gcFunc ...HostImageGCFunc)

HostImageGC cli: docker rmi IMAGE_ID maybe quota by:

1. image CREATED: since, before 2. image SIZE: bytes(B) 3. cache algorithm policy: lru, lfu 4. host disk: bytes(B)

func (*Client) ImportContainer added in v1.1.4

func (c *Client) ImportContainer(destRefStr string) (io.ReadCloser, error)

func (*Client) ImportImage added in v1.1.3

func (c *Client) ImportImage(absRefStr string, input io.Reader) (io.ReadCloser, error)

ImportImage +param input

(1). make sure the input file(.tar.gz) metadata attribute image name format is: registry/project/image_name:image_tag

(1.1). or will create new image tag to local

(2). push image to registry

func (*Client) InspectImage added in v1.1.4

func (c *Client) InspectImage(imageID string) (types.ImageInspect, error)

InspectImage +param imageID or imageName

func (*Client) ListContainerFullIds

func (c *Client) ListContainerFullIds() ([]string, error)

func (*Client) ListContainerIds

func (c *Client) ListContainerIds() ([]string, error)

func (*Client) ListContainerNames

func (c *Client) ListContainerNames() ([]string, error)

func (*Client) ListContainers

func (c *Client) ListContainers() ([]types.Container, error)

func (*Client) RegistryAuth added in v1.1.4

func (c *Client) RegistryAuth(config *registry.AuthConfig) (string, error)

func (*Client) WithContext

func (c *Client) WithContext(ctx context.Context) *Client

func (*Client) WithPage

func (c *Client) WithPage(page *util.Page) *Client

func (*Client) WithRegistryAuth added in v1.1.4

func (c *Client) WithRegistryAuth(registryAuthConfig *registry.AuthConfig) *Client

type HostImageGCFunc added in v1.1.3

type HostImageGCFunc util.Func

Directories

Path Synopsis
Package docker_inst/client.go was generated by codegen, please fix its package dependency, but do not modify its functionality
Package docker_inst/client.go was generated by codegen, please fix its package dependency, but do not modify its functionality

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL