Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ContainerManager ¶
type ContainerManager interface { GetAllContainer() ([]types.ContainerInfo, error) GetAllImage() ([]types.ImageInfo, error) GetAllNetwork() ([]types.NetworkInfo, error) GetContainerById(id string) (dockertypes.ContainerJSON, error) GetImageById(id string) (dockertypes.ImageInspect, error) GetNetworkById(id string) (dockertypes.NetworkResource, error) StopContainerById(id string) error DeleteContainerById(id string) error DeleteImageById(id string) error DeleteNetworkById(id string) error PullImage(name string, version string) (io.ReadCloser, error) //需要外部关闭readerClose BuildImage(dockerfile string) (dockertypes.ImageBuildResponse, error) GetContainerLogById(id string) (io.ReadCloser, error) //需要外部关闭readerClose CreateContainer(imageId string, env []string, cmd []string, ports map[int]int, containerName string) (containertypes.ContainerCreateCreatedBody, error) StartContainer(containerID string) error CreateNetwork(name string, subnet string, gateway string) (dockertypes.NetworkCreateResponse, error) ConnectNetwork(networkId string, containerId string) error DisconnectNetwork(networkId string, containerId string) error // ConnContainer(id string) (net.Conn, *bufio.Reader, error) ConnContainer(id string) (dockertypes.HijackedResponse, error) BashContainer(id string) (*dockertypes.HijackedResponse, error) }
func GetCM ¶
func GetCM() ContainerManager
type DockerClient ¶
type DockerClient interface { client.ImageAPIClient client.ContainerAPIClient client.NetworkAPIClient }
Click to show internal directories.
Click to hide internal directories.