Documentation ¶
Index ¶
- func ContainerCreate(config *container.Config, hostConfig *container.HostConfig, ...) (container.CreateResponse, error)
- func ContainerDelete(name string, opts container.RemoveOptions) error
- func ContainerKill(name string) error
- func ContainerRestart(name string) error
- func ContainerStart(name string, opts container.StartOptions) error
- func ContainerStop(name string) error
- func ContainerWait(name string, condition container.WaitCondition) (<-chan container.WaitResponse, <-chan error)
- func CopyGitStackToHost(src, dst string, stackID int, stackName, assetPath string) error
- func CreateSnapshot(edgeKey string) (*portainer.DockerSnapshot, error)
- func GetContainerLogs(containerName string, tail string) ([]byte, []byte, error)
- func GetContainersWithLabel(value string) (r []types.Container, err error)
- func ImageDelete(name string, opts image.RemoveOptions) (r []image.DeleteResponse, err error)
- func ImagePull(refStr string, options image.PullOptions) (io.ReadCloser, error)
- func NewClient() (*client.Client, error)
- func RemoveGitStackFromHost(src, dst string, stackID int, stackName string) error
- func VolumeDelete(name string, force bool) error
- type InfoService
- func (service *InfoService) GetContainerIpFromDockerEngine(containerName string, ignoreNonSwarmNetworks bool) (string, error)
- func (service *InfoService) GetRuntimeConfigurationFromDockerEngine() (*agent.RuntimeConfig, error)
- func (service *InfoService) GetServiceNameFromDockerEngine(containerName string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainerCreate ¶
func ContainerCreate( config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *specs.Platform, containerName string, ) (container.CreateResponse, error)
func ContainerDelete ¶
func ContainerDelete(name string, opts container.RemoveOptions) error
func ContainerKill ¶
func ContainerRestart ¶
func ContainerStart ¶
func ContainerStart(name string, opts container.StartOptions) error
func ContainerStop ¶
func ContainerWait ¶
func ContainerWait(name string, condition container.WaitCondition) (<-chan container.WaitResponse, <-chan error)
func CopyGitStackToHost ¶
CopyGitStackToHost copies src folder to the dst folder on the host
func CreateSnapshot ¶
func CreateSnapshot(edgeKey string) (*portainer.DockerSnapshot, error)
func GetContainerLogs ¶
func GetContainersWithLabel ¶
func ImageDelete ¶
func ImageDelete(name string, opts image.RemoveOptions) (r []image.DeleteResponse, err error)
func ImagePull ¶
func ImagePull(refStr string, options image.PullOptions) (io.ReadCloser, error)
func RemoveGitStackFromHost ¶
RemoveGitStackFromHost removes the copy of src folder on the host
func VolumeDelete ¶
Types ¶
type InfoService ¶
type InfoService struct{}
DockerInfoService is a service used to retrieve information from a Docker environment using the Docker library.
func NewInfoService ¶
func NewInfoService() *InfoService
NewInfoService returns a pointer to an instance of DockerInfoService
func (*InfoService) GetContainerIpFromDockerEngine ¶
func (service *InfoService) GetContainerIpFromDockerEngine(containerName string, ignoreNonSwarmNetworks bool) (string, error)
GetContainerIpFromDockerEngine is used to retrieve the IP address of the container through Docker. It will inspect the container to retrieve the networks associated to the container and returns the IP associated to the first network found that is not an ingress network. If the ignoreNonSwarmNetworks parameter is specified, it will also ignore non Swarm scoped networks.
func (*InfoService) GetRuntimeConfigurationFromDockerEngine ¶
func (service *InfoService) GetRuntimeConfigurationFromDockerEngine() (*agent.RuntimeConfig, error)
GetRuntimeConfigurationFromDockerEngine retrieves information from a Docker environment and returns a map of labels.
func (*InfoService) GetServiceNameFromDockerEngine ¶
func (service *InfoService) GetServiceNameFromDockerEngine(containerName string) (string, error)
GetServiceNameFromDockerEngine is used to return the name of the Swarm service the agent is part of. The service name is retrieved through container labels.