summaryrefslogtreecommitdiff
path: root/api/types/types.go
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2022-03-06 21:30:07 +0100
committerSebastiaan van Stijn <github@gone.nl>2022-03-08 23:52:41 +0100
commit14cb9d22df7e6674d7f1ebd73651510f213574c4 (patch)
treedaabb75c145c3a411b1f9602d2ce5ae54f8cbd61 /api/types/types.go
parent0a438f26129eebd8ced81836c1d52976d1a53647 (diff)
downloaddocker-14cb9d22df7e6674d7f1ebd73651510f213574c4.tar.gz
api/types: add godoc on MountPoint
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'api/types/types.go')
-rw-r--r--api/types/types.go43
1 files changed, 37 insertions, 6 deletions
diff --git a/api/types/types.go b/api/types/types.go
index e52be89a93..1afc4bf9d3 100644
--- a/api/types/types.go
+++ b/api/types/types.go
@@ -502,13 +502,44 @@ type DefaultNetworkSettings struct {
// MountPoint represents a mount point configuration inside the container.
// This is used for reporting the mountpoints in use by a container.
type MountPoint struct {
- Type mount.Type `json:",omitempty"`
- Name string `json:",omitempty"`
- Source string
+ // Type is the type of mount, see `Type<foo>` definitions in
+ // github.com/docker/docker/api/types/mount.Type
+ Type mount.Type `json:",omitempty"`
+
+ // Name is the name reference to the underlying data defined by `Source`
+ // e.g., the volume name.
+ Name string `json:",omitempty"`
+
+ // Source is the source location of the mount.
+ //
+ // For volumes, this contains the storage location of the volume (within
+ // `/var/lib/docker/volumes/`). For bind-mounts, and `npipe`, this contains
+ // the source (host) part of the bind-mount. For `tmpfs` mount points, this
+ // field is empty.
+ Source string
+
+ // Destination is the path relative to the container root (`/`) where the
+ // Source is mounted inside the container.
Destination string
- Driver string `json:",omitempty"`
- Mode string
- RW bool
+
+ // Driver is the volume driver used to create the volume (if it is a volume).
+ Driver string `json:",omitempty"`
+
+ // Mode is a comma separated list of options supplied by the user when
+ // creating the bind/volume mount.
+ //
+ // The default is platform-specific (`"z"` on Linux, empty on Windows).
+ Mode string
+
+ // RW indicates whether the mount is mounted writable (read-write).
+ RW bool
+
+ // Propagation describes how mounts are propagated from the host into the
+ // mount point, and vice-versa. Refer to the Linux kernel documentation
+ // for details:
+ // https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt
+ //
+ // This field is not used on Windows.
Propagation mount.Propagation
}