-
-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy patherrors.go
More file actions
117 lines (108 loc) · 6.95 KB
/
Copy patherrors.go
File metadata and controls
117 lines (108 loc) · 6.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
package container
import (
"errors"
)
// Errors for client operations in client.go.
var (
// errCreateExecFailed indicates a failure to create an exec instance in a container.
errCreateExecFailed = errors.New("failed to create exec instance")
// errStartExecFailed indicates a failure to start an exec instance in a container.
errStartExecFailed = errors.New("failed to start exec instance")
// errAttachExecFailed indicates a failure to attach to an exec instance for output capture.
errAttachExecFailed = errors.New("failed to attach to exec instance")
// errReadExecOutputFailed indicates a failure to read output from an exec instance.
errReadExecOutputFailed = errors.New("failed to read exec output")
// errInspectExecFailed indicates a failure to inspect an exec instance's status.
errInspectExecFailed = errors.New("failed to inspect exec instance")
// errCommandFailed indicates a command executed in a container failed with a non-zero exit code.
errCommandFailed = errors.New("command execution failed")
)
// Errors for container operations in container_source.go.
var (
// errListContainersFailed indicates a failure to list containers from the Docker host.
errListContainersFailed = errors.New("failed to list containers")
// errInspectContainerFailed indicates a failure to inspect a container's details.
errInspectContainerFailed = errors.New("failed to inspect container")
// errStopContainerFailed indicates a failure to stop a container with a signal.
errStopContainerFailed = errors.New("failed to stop container")
// errRemoveContainerFailed indicates a failure to remove a container from the host.
errRemoveContainerFailed = errors.New("failed to remove container")
// errUnexpectedMacInLegacy indicates a MAC address was found in a legacy API configuration where it should not be.
errUnexpectedMacInLegacy = errors.New("unexpected MAC address in legacy config")
// errUnexpectedMacInHost indicates a MAC address was found in a host network configuration where it should not be.
errUnexpectedMacInHost = errors.New("unexpected MAC address in host network config")
// errNoMacInNonHost indicates no MAC address was found in a non-host network configuration where one is expected.
errNoMacInNonHost = errors.New("no MAC address found in non-host network config")
// errNilSourceEndpoint indicates a nil source endpoint was provided.
errNilSourceEndpoint = errors.New("nil source endpoint provided")
)
// Errors for container start and rename operations in container_target.go.
var (
// errCreateContainerFailed indicates a failure to create a new container.
errCreateContainerFailed = errors.New("failed to create container")
// errStartContainerFailed indicates a failure to start a newly created container.
errStartContainerFailed = errors.New("failed to start container")
// errRenameContainerFailed indicates a failure to rename an existing container.
errRenameContainerFailed = errors.New("failed to rename container")
)
// Errors for container configuration and metadata operations in container.go.
var (
// errNoImageInfo indicates the container lacks image metadata required for recreation.
errNoImageInfo = errors.New("no image info available")
// errNoContainerInfo indicates the container lacks metadata required for recreation.
errNoContainerInfo = errors.New("no container info available")
// errInvalidConfig indicates the container's configuration is invalid for recreation.
errInvalidConfig = errors.New("invalid container configuration")
// ErrUnexpectedContainerType indicates an unexpected container type was encountered.
ErrUnexpectedContainerType = errors.New("unexpected container type")
// errCurrentContainerNotCached indicates the current container is not cached for scope derivation.
errCurrentContainerNotCached = errors.New("current container not cached for scope derivation")
)
// Errors for image operations in image.go.
var (
// ErrImageInUse indicates that the image is actively used by a container and cannot be removed.
ErrImageInUse = errors.New("image is actively used by a container")
// errPinnedImage indicates an attempt to pull an immutable (sha256-pinned) image.
errPinnedImage = errors.New("image is pinned with sha256, skipping pull")
// errInspectImageFailed indicates a failure to inspect an image from the Docker daemon.
errInspectImageFailed = errors.New("failed to inspect image")
// errPullImageFailed indicates a failure to pull an image from the registry.
errPullImageFailed = errors.New("failed to pull image")
// ErrPullImageUnauthorized indicates an authentication failure during image pull.
ErrPullImageUnauthorized = errors.New("failed to pull image: authentication required")
// ErrPullImageNotFound indicates the image was not found in the registry.
ErrPullImageNotFound = errors.New("failed to pull image: image not found")
// errReadPullResponseFailed indicates a failure to read the pull response stream.
errReadPullResponseFailed = errors.New("failed to read pull response")
// errRemoveImageFailed indicates a failure to remove an image from the Docker host.
errRemoveImageFailed = errors.New("failed to remove image")
)
// Errors for label operations in metadata.go.
var (
// errLabelNotFound indicates a requested label is not present in the container's metadata.
errLabelNotFound = errors.New("label not found")
)
// Errors for container ID detection operations in container_id.go.
var (
// errReadMountinfoFile indicates a failure to read the mountinfo file for the current process.
errReadMountinfoFile = errors.New("failed to read mountinfo file")
// errExtractContainerIDFromMountinfo indicates a failure to extract a container ID from mountinfo data.
errExtractContainerIDFromMountinfo = errors.New("failed to extract container ID from mountinfo")
// errReadCgroupFile indicates a failure to read the cgroup file for the current process.
errReadCgroupFile = errors.New("failed to read cgroup file")
// errExtractContainerID indicates a failure to extract a container ID from the cgroup data.
errExtractContainerID = errors.New("failed to extract container ID")
// errNoValidContainerID indicates no valid Docker container ID was found in the input data.
errNoValidContainerID = errors.New("no valid docker container ID found in input")
// ErrContainerIDNotFound indicates the container ID could not be found using hostname matching.
ErrContainerIDNotFound = errors.New("HOSTNAME environment variable is not set")
// errNoContainerWithHostname indicates no container was found with the matching hostname.
errNoContainerWithHostname = errors.New("no container found with matching hostname")
)
// Errors for ephemeral orchestrator operations in ephemeral.go.
var (
// ErrEphemeralCreateFailed indicates a failure to create the ephemeral orchestrator container.
ErrEphemeralCreateFailed = errors.New("failed to create ephemeral orchestrator container")
// ErrEphemeralStartFailed indicates a failure to start the ephemeral orchestrator container.
ErrEphemeralStartFailed = errors.New("failed to start ephemeral orchestrator container")
)