Documentation
¶
Index ¶
- type KeepIDUserNsOptions
- type NetworkMode
- func (n NetworkMode) Container() string
- func (n NetworkMode) IsBridge() bool
- func (n NetworkMode) IsContainer() bool
- func (n NetworkMode) IsDefault() bool
- func (n NetworkMode) IsHost() bool
- func (n NetworkMode) IsNS() bool
- func (n NetworkMode) IsNone() bool
- func (n NetworkMode) IsPasta() bool
- func (n NetworkMode) IsPod() bool
- func (n NetworkMode) IsPrivate() bool
- func (n NetworkMode) IsSlirp4netns() bool
- func (n NetworkMode) IsUserDefined() bool
- func (n NetworkMode) NS() string
- func (n NetworkMode) UserDefined() string
- type UsernsMode
- func (n UsernsMode) Container() string
- func (n UsernsMode) GetKeepIDOptions() (*KeepIDUserNsOptions, error)
- func (n UsernsMode) IsAuto() bool
- func (n UsernsMode) IsContainer() bool
- func (n UsernsMode) IsDefaultValue() bool
- func (n UsernsMode) IsHost() bool
- func (n UsernsMode) IsKeepID() bool
- func (n UsernsMode) IsNS() bool
- func (n UsernsMode) IsNoMap() bool
- func (n UsernsMode) IsPrivate() bool
- func (n UsernsMode) NS() string
- func (n UsernsMode) Valid() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeepIDUserNsOptions ¶
type KeepIDUserNsOptions struct { // UID is the target uid in the user namespace. UID *uint32 // GID is the target uid in the user namespace. GID *uint32 // MaxSize is the maximum size of the user namespace. MaxSize *uint32 }
KeepIDUserNsOptions defines how to create a user namespace using keep-id.
type NetworkMode ¶
type NetworkMode string
NetworkMode represents the container network stack.
func (NetworkMode) Container ¶
func (n NetworkMode) Container() string
Container is the id of the container which network this container is connected to.
func (NetworkMode) IsBridge ¶
func (n NetworkMode) IsBridge() bool
IsBridge indicates whether container uses the bridge network stack
func (NetworkMode) IsContainer ¶
func (n NetworkMode) IsContainer() bool
IsContainer indicates whether container uses a container network stack.
func (NetworkMode) IsDefault ¶
func (n NetworkMode) IsDefault() bool
IsDefault indicates whether container uses the default network stack.
func (NetworkMode) IsHost ¶
func (n NetworkMode) IsHost() bool
IsHost indicates whether the container uses the host's network stack.
func (NetworkMode) IsNS ¶
func (n NetworkMode) IsNS() bool
IsNS indicates a network namespace passed in by path (ns:<path>)
func (NetworkMode) IsNone ¶
func (n NetworkMode) IsNone() bool
IsNone indicates whether container isn't using a network stack.
func (NetworkMode) IsPasta ¶
func (n NetworkMode) IsPasta() bool
IsPasta indicates if we are running a rootless network stack using pasta
func (NetworkMode) IsPod ¶
func (n NetworkMode) IsPod() bool
IsPod returns whether the network refers to pod networking
func (NetworkMode) IsPrivate ¶
func (n NetworkMode) IsPrivate() bool
IsPrivate indicates whether container uses its private network stack.
func (NetworkMode) IsSlirp4netns ¶
func (n NetworkMode) IsSlirp4netns() bool
IsSlirp4netns indicates if we are running a rootless network stack
func (NetworkMode) IsUserDefined ¶
func (n NetworkMode) IsUserDefined() bool
IsUserDefined indicates user-created network
func (NetworkMode) NS ¶
func (n NetworkMode) NS() string
NS gets the path associated with a ns:<path> network ns
func (NetworkMode) UserDefined ¶
func (n NetworkMode) UserDefined() string
UserDefined indicates user-created network
type UsernsMode ¶
type UsernsMode string
UsernsMode represents userns mode in the container.
func (UsernsMode) Container ¶
func (n UsernsMode) Container() string
Container is the id of the container which network this container is connected to.
func (UsernsMode) GetKeepIDOptions ¶
func (n UsernsMode) GetKeepIDOptions() (*KeepIDUserNsOptions, error)
GetKeepIDOptions returns a KeepIDUserNsOptions with the settings to keepIDmatically set up a user namespace.
func (UsernsMode) IsAuto ¶
func (n UsernsMode) IsAuto() bool
IsAuto indicates whether container uses the "auto" userns mode.
func (UsernsMode) IsContainer ¶
func (n UsernsMode) IsContainer() bool
IsContainer indicates whether container uses a container userns.
func (UsernsMode) IsDefaultValue ¶
func (n UsernsMode) IsDefaultValue() bool
IsDefaultValue indicates whether the user namespace has the default value.
func (UsernsMode) IsHost ¶
func (n UsernsMode) IsHost() bool
IsHost indicates whether the container uses the host's userns.
func (UsernsMode) IsKeepID ¶
func (n UsernsMode) IsKeepID() bool
IsKeepID indicates whether container uses a mapping where the (uid, gid) on the host is kept inside of the namespace.
func (UsernsMode) IsNS ¶
func (n UsernsMode) IsNS() bool
IsNS indicates a userns namespace passed in by path (ns:<path>)
func (UsernsMode) IsNoMap ¶
func (n UsernsMode) IsNoMap() bool
IsNoMap indicates whether container uses a mapping where the (uid, gid) on the host is not present in the namespace.
func (UsernsMode) IsPrivate ¶
func (n UsernsMode) IsPrivate() bool
IsPrivate indicates whether the container uses the a private userns.
func (UsernsMode) NS ¶
func (n UsernsMode) NS() string
NS gets the path associated with a ns:<path> userns ns
func (UsernsMode) Valid ¶
func (n UsernsMode) Valid() bool
Valid indicates whether the userns is valid.