Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerInformation ¶
type ContainerInformation struct { Name string Image string CID string GUID string ENV map[string]string //新增 SERVE gitlab-runner字段 ImagePullPolicy string Lifecycle map[string]string LivenessProbe map[string]string ReadinessProbe map[string]string Reasources map[string]string SecurityContext map[string]string VolumeMounts map[string]string TerminationMessagePath []string TerminationMessagePolicy []string }
func (*ContainerInformation) GetEnvStr ¶
func (i *ContainerInformation) GetEnvStr() []string
type Controller ¶
type Controller interface { Contains(imageTag string) (bool, error) ListTags() ([]string, error) ListContainIds() ([]string, error) DeleteTag(imageTag string) error UploadTag(imageTag string) error LoadTag(imageTag string) error StartStrategy(imageTag string, containerName string, envs map[string]string) (*ContainerInformation, error) StartStrategyWithPort(imageTag string, containerName string, envs map[string]string, port string) (*ContainerInformation, error) StartContainer(imageTag string, containerName string, envs map[string]string) (*ContainerInformation, error) StartContainerWithPorts(tag, name string, envs map[string]string, ports map[string]string) (*ContainerInformation, error) StartContainerWithPortsForCar(tag, name string, envs map[string]string, ports map[string]string) (*ContainerInformation, error) StartContainerWithPortsForAgent(tag, name, runtime, workDir, ImagePullPolicy string, envs, ports, Lifecycle, LivenessProbe, ReadinessProbe, Reasources, SecurityContext, VolumeMounts map[string]string, cmds, TerminationMessagePath, TerminationMessagePolicy []string) (*ContainerInformation, error) Stop(containerId string) error ReStart(containerId string) error Resume(containerId string) error Remove(containerId string) error Log(containerId string) (string, error) LogChan(id string) (*LogWriter, func() error, error) Close() error GetContainerStats(containerId string) (*types.StatsJSON, error) ContainerExec(containerId string, cmd []string) error }
func NewDockerController ¶
func NewDockerController(ctx context.Context, url string) (Controller, error)
Click to show internal directories.
Click to hide internal directories.