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
// Container is the containerd sandbox container client
Container containerd.Container
// CNI network namespace client
NetNS *NetNS
// IP of Pod if it is attached to non host network
IP string
}
Sandbox contains all resources associated with the sandbox. All methods to mutate the internal state are thread safe.
Click to show internal directories.
Click to hide internal directories.