Documentation ¶
Index ¶
- Constants
- Variables
- func CreateContainer(ctx context.Context, dClient *client.Client, hostname string, ...) (container.ContainerCreateCreatedBody, error)
- func DoRemoveContainer(ctx context.Context, dClient *client.Client, containerName, hostname string) error
- func DoRestartContainer(ctx context.Context, dClient *client.Client, containerName, hostname string) error
- func DoRollingUpdateContainer(ctx context.Context, dClient *client.Client, imageCfg *container.Config, ...) error
- func DoRunContainer(ctx context.Context, dClient *client.Client, imageCfg *container.Config, ...) error
- func GetContainerLogsStdoutStderr(ctx context.Context, dClient *client.Client, containerName, tail string, ...) (string, string, error)
- func GetContainerOutput(ctx context.Context, dClient *client.Client, containerName, hostname string) (int64, string, string, error)
- func GetImageRegistryConfig(image string, prsMap map[string]types.PrivateRegistry) (string, string, error)
- func GetKubeletDockerConfig(prsMap map[string]types.PrivateRegistry) (string, error)
- func InspectContainer(ctx context.Context, dClient *client.Client, hostname string, ...) (dockertypes.ContainerJSON, error)
- func IsContainerRunning(ctx context.Context, dClient *client.Client, hostname string, ...) (bool, error)
- func IsContainerUpgradable(ctx context.Context, dClient *client.Client, imageCfg *container.Config, ...) (bool, error)
- func IsSupportedDockerVersion(info dockertypes.Info, K8sVersion string) (bool, error)
- func LoadImage(ctx context.Context, dClient *client.Client, hostname, filePath string) error
- func ReadContainerLogs(ctx context.Context, dClient *client.Client, containerName string, follow bool, ...) (io.ReadCloser, error)
- func ReadFileFromContainer(ctx context.Context, dClient *client.Client, ...) (string, error)
- func RemoveContainer(ctx context.Context, dClient *client.Client, hostname string, ...) error
- func RenameContainer(ctx context.Context, dClient *client.Client, hostname string, ...) error
- func RestartContainer(ctx context.Context, dClient *client.Client, hostname, containerName string) error
- func StartContainer(ctx context.Context, dClient *client.Client, hostname string, ...) error
- func StopContainer(ctx context.Context, dClient *client.Client, hostname string, ...) error
- func StopRenameContainer(ctx context.Context, dClient *client.Client, hostname string, ...) error
- func UseLocalOrPull(ctx context.Context, dClient *client.Client, hostname string, ...) error
- func WaitForContainer(ctx context.Context, dClient *client.Client, hostname string, ...) (int64, error)
Constants ¶
View Source
const ( DockerRegistryURL = "docker.io" // RestartTimeout in seconds RestartTimeout = 5 // StopTimeout in seconds StopTimeout = 5 )
Variables ¶
View Source
var K8sDockerVersions = map[string][]string{
"1.17": {"1.13.x", "17.03.x", "17.06.x", "17.09.x", "18.06.x", "18.09.x", "19.03.x"},
}
Functions ¶
func CreateContainer ¶
func DoRemoveContainer ¶
func DoRestartContainer ¶
func DoRunContainer ¶
func GetContainerOutput ¶
func GetImageRegistryConfig ¶
func GetKubeletDockerConfig ¶
func GetKubeletDockerConfig(prsMap map[string]types.PrivateRegistry) (string, error)
func InspectContainer ¶
func InspectContainer(ctx context.Context, dClient *client.Client, hostname string, containerName string) (dockertypes.ContainerJSON, error)
func IsContainerRunning ¶
func IsContainerUpgradable ¶
func IsSupportedDockerVersion ¶
func IsSupportedDockerVersion(info dockertypes.Info, K8sVersion string) (bool, error)
func ReadContainerLogs ¶
func ReadFileFromContainer ¶
func RemoveContainer ¶
func RenameContainer ¶
func RestartContainer ¶
func StartContainer ¶
func StopContainer ¶
func StopRenameContainer ¶
func UseLocalOrPull ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.