Documentation
¶
Index ¶
- func CheckNamespacesExists(ctx context.Context, namespaces []LinuxNamespaceWithInode, ...) error
- func ReadCgroupPath(ctx context.Context, pid int) (string, error)
- func RefreshNamespacesUsingInode(ctx context.Context, namespaces []LinuxNamespaceWithInode)
- func RootCommandContext(ctx context.Context, name string, arg ...string) *exec.Cmd
- func SidecarImagePath() string
- func ToLinuxNamespaces(ns []LinuxNamespaceWithInode) []specs.LinuxNamespace
- type KeyMutex
- type LinuxNamespaceWithInode
- type TargetContainerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckNamespacesExists ¶ added in v1.1.10
func CheckNamespacesExists(ctx context.Context, namespaces []LinuxNamespaceWithInode, wantedTypes ...specs.LinuxNamespaceType) error
func RefreshNamespacesUsingInode ¶ added in v1.1.25
func RefreshNamespacesUsingInode(ctx context.Context, namespaces []LinuxNamespaceWithInode)
RefreshNamespacesUsingInode if the denoted namespace path doesn't exist the path update it using updating also the list.
func RootCommandContext ¶
func SidecarImagePath ¶ added in v1.1.1
func SidecarImagePath() string
func ToLinuxNamespaces ¶ added in v1.1.25
func ToLinuxNamespaces(ns []LinuxNamespaceWithInode) []specs.LinuxNamespace
Types ¶
type KeyMutex ¶ added in v1.1.16
type KeyMutex interface {
// Acquires a lock associated with the specified ID, creates the lock if one doesn't already exist.
LockKey(id string)
// Releases the lock associated with the specified ID.
// Returns an error if the specified ID doesn't exist.
UnlockKey(id string) error
}
KeyMutex is a thread-safe interface for acquiring locks on arbitrary strings.
func NewHashedKeyMutex ¶ added in v1.1.16
NewHashedKeyMutex returns a new instance of KeyMutex which hashes arbitrary keys to a fixed set of locks. `n` specifies number of locks, if n <= 0, we use number of cpus. Note that because it uses fixed set of locks, different keys may share same lock, so it's possible to wait on same lock.
type LinuxNamespaceWithInode ¶ added in v1.1.10
type LinuxNamespaceWithInode struct {
specs.LinuxNamespace
Inode uint64
}
func FilterNamespaces ¶ added in v1.1.25
func FilterNamespaces(ns []LinuxNamespaceWithInode, types ...specs.LinuxNamespaceType) []LinuxNamespaceWithInode
func ReadNamespaces ¶
func ReadNamespaces(ctx context.Context, pid int) ([]LinuxNamespaceWithInode, error)
type TargetContainerConfig ¶ added in v1.1.25
type TargetContainerConfig struct {
ContainerID string `json:"id"`
Pid int `json:"pid"`
Namespaces []LinuxNamespaceWithInode `json:"namespaces"`
CGroupPath string `json:"cgroupPath"`
}
Click to show internal directories.
Click to hide internal directories.