Debian Codegraph @

launcher/internal/launchermount/mount.go

raw
1 // Package launchermount defines mount types for the launcher workload.
2 package launchermount
3
4 import "github.com/opencontainers/runtime-spec/specs-go"
5
6 // Key-value constants for mount configurations.
7 // Keys are used to specify the specific mount configuration.
8 // For example, TypeKey is used to specify the type of mount.
9 // Consts not suffixed with Key are constant values for given mount configs.
10 const (
11 TypeKey = "type"
12 SourceKey = "source"
13 DestinationKey = "destination"
14 SizeKey = "size"
15 TypeTmpfs = "tmpfs"
16 )
17
18 var (
19 // AllMountKeys are all possible mount configuration key names.
20 AllMountKeys = []string{TypeKey, SourceKey, DestinationKey, SizeKey}
21 )
22
23 // Mount is the interface to implement for a new container launcher mount type.
24 type Mount interface {
25 // SpecsMount converts the Mount type to an OCI spec Mount.
26 SpecsMount() specs.Mount
27 // The absolute path mount point for this mount in the container.
28 // Stored as Destination in specs.Mount.
29 Mountpoint() string
30 }