Documentation ¶
Index ¶
- Constants
- Variables
- func AutoSelectRuntime() string
- func AvailableRuntimes() []string
- func CanConnect(socket string) bool
- func ExtractRegistry(repo string) string
- func GetPodmanConnContext() context.Context
- func GetPodmanConnContextWithConn(connURI string) context.Context
- func GetPodmanRemotePath() string
- func GetPodmanSocketPath() string
- func HasSocket(name string) bool
- func PodmanGetDefaultConnection() (string, string)
- func PodmanIsRemote() bool
- type APIClient
- type AuthConfig
- type BasicImageInfo
- type HealthConfig
- type ImageBuilderAPIClient
- type ImageHistory
- type ImageIdentity
- type ImageInfo
- type ImageLoaderAPIClient
- type ImageSaverAPIClient
- type InspectorAPIClient
- type PullImageOptions
- type RunConfig
- type RuntimeInfo
Constants ¶
View Source
const ( AutoRuntime = "auto" //auto-select by detecting runtimes AutoRuntimeDesc = "Auto-select based on detected runtimes" DockerRuntime = "docker" DockerRuntimeDesc = "Docker runtime - debug a container running in Docker" ContainerdRuntime = "containerd" ContainerdRuntimeDesc = "ContainerD runtime" KubernetesRuntime = "k8s" KubernetesRuntimeDesc = "Kubernetes runtime - debug a container running in Kubernetes" KubeconfigDefault = "${HOME}/.kube/config" NamespaceDefault = "default" PodmanRuntime = "podman" PodmanRuntimeDesc = "Podman runtime" )
View Source
const ( ContainerdRuntimeSocket = "/var/run/containerd/containerd.sock" DockerRuntimeSocket = "/var/run/docker.sock" PodmanRuntimeSocket = "/var/run/podman/podman.sock" )
Variables ¶
View Source
var ( ErrBadParam = errors.New("crt - bad parameter") ErrNotFound = errors.New("crt - not found") )
View Source
var PodmanConnErr error
Functions ¶
func AutoSelectRuntime ¶
func AutoSelectRuntime() string
func AvailableRuntimes ¶
func AvailableRuntimes() []string
func CanConnect ¶
func ExtractRegistry ¶
func GetPodmanConnContext ¶
func GetPodmanRemotePath ¶
func GetPodmanRemotePath() string
func GetPodmanSocketPath ¶
func GetPodmanSocketPath() string
func PodmanIsRemote ¶
func PodmanIsRemote() bool
Types ¶
type APIClient ¶
type APIClient interface { InspectorAPIClient ImageSaverAPIClient ImageLoaderAPIClient ImageBuilderAPIClient }
type AuthConfig ¶
type AuthConfig interface{}
type BasicImageInfo ¶
type HealthConfig ¶
type ImageBuilderAPIClient ¶
type ImageBuilderAPIClient interface { BuildImage(options imagebuilder.DockerfileBuildOptions) error BuildOutputLog() string }
type ImageHistory ¶
type ImageIdentity ¶
type ImageIdentity struct { ID string ShortTags []string RepoTags []string ShortDigests []string RepoDigests []string }
func ImageToIdentity ¶
func ImageToIdentity(info *ImageInfo) *ImageIdentity
type ImageLoaderAPIClient ¶
type ImageSaverAPIClient ¶
type InspectorAPIClient ¶
type InspectorAPIClient interface { HasImage(imageRef string) (*ImageIdentity, error) ListImages(imageNameFilter string) (map[string]BasicImageInfo, error) ListImagesAll() ([]BasicImageInfo, error) InspectImage(imageRef string) (*ImageInfo, error) GetImagesHistory(imageRef string) ([]ImageHistory, error) PullImage(opts PullImageOptions, authConfig AuthConfig) error GetRegistryAuthConfig(account, secret, configPath, registry string) (AuthConfig, error) }
type PullImageOptions ¶
type RunConfig ¶
type RunConfig struct { User string `json:"User,omitempty"` ExposedPorts map[string]struct{} `json:"ExposedPorts,omitempty"` Env []string `json:"Env,omitempty"` Entrypoint []string `json:"Entrypoint,omitempty"` Cmd []string `json:"Cmd,omitempty"` Volumes map[string]struct{} `json:"Volumes,omitempty"` WorkingDir string `json:"WorkingDir,omitempty"` Labels map[string]string `json:"Labels,omitempty"` StopSignal string `json:"StopSignal,omitempty"` ArgsEscaped bool `json:"ArgsEscaped,omitempty"` Healthcheck *HealthConfig `json:"Healthcheck,omitempty"` //Extra fields AttachStderr bool `json:"AttachStderr,omitempty"` AttachStdin bool `json:"AttachStdin,omitempty"` AttachStdout bool `json:"AttachStdout,omitempty"` Domainname string `json:"Domainname,omitempty"` Hostname string `json:"Hostname,omitempty"` Image string `json:"Image,omitempty"` OnBuild []string `json:"OnBuild,omitempty"` OpenStdin bool `json:"OpenStdin,omitempty"` StdinOnce bool `json:"StdinOnce,omitempty"` Tty bool `json:"Tty,omitempty"` NetworkDisabled bool `json:"NetworkDisabled,omitempty"` MacAddress string `json:"MacAddress,omitempty"` StopTimeout *int `json:"StopTimeout,omitempty"` Shell []string `json:"Shell,omitempty"` }
RunConfig describes the runtime config parameters for container instances (aka Config in other libraries) Fields (ordered according to spec): Memory, MemorySwap, CpuShares aren't necessary * https://github.com/opencontainers/image-spec/blob/main/config.md#properties (Config field) * https://github.com/moby/moby/blob/master/api/types/container/config.go#L70 Note: related to pkg/docker/dockerimage/ContainerConfig TODO: refactor into one set of common structs later
type RuntimeInfo ¶
Click to show internal directories.
Click to hide internal directories.