Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrClosedNetNS = errors.New("network namespace is closed")
ErrClosedNetNS is the error returned when network namespace is closed.
Functions ¶
This section is empty.
Types ¶
type Metadata ¶
type Metadata struct { // ID is the sandbox id. ID string // Name is the sandbox name. Name string // Config is the CRI sandbox config. Config *runtime.PodSandboxConfig // NetNSPath is the network namespace used by the sandbox. NetNSPath string }
Metadata is the unversioned sandbox metadata.
func (*Metadata) MarshalJSON ¶
MarshalJSON encodes Metadata into bytes in json format.
func (*Metadata) UnmarshalJSON ¶
UnmarshalJSON decodes Metadata from bytes.
type NetNS ¶
NetNS holds network namespace for sandbox
func LoadNetNS ¶
LoadNetNS loads existing network namespace. It returns ErrClosedNetNS if the network namespace has already been closed.
type Sandbox ¶
type Sandbox struct { // Metadata is the metadata of the sandbox, it is immutable after created. Metadata // Containerd sandbox container Container containerd.Container // CNI network namespace client NetNS *NetNS }
Sandbox contains all resources associated with the sandbox. All methods to mutate the internal state are thread safe.
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store stores all sandboxes.
func LoadStore ¶
func LoadStore() *Store
LoadStore loads sandboxes from runtime. TODO(random-liu): Implement LoadStore.
Click to show internal directories.
Click to hide internal directories.