Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigList ¶
type ConfigList struct { // Version of the list Version string `json:"version"` // Plugins Plugins []*Plugin `json:"plugins"` }
ConfigList for the global configuration of NRI
Normally located at /etc/nri/conf.json
type Plugin ¶
type Plugin struct { // Type of plugin Type string `json:"type"` // Conf for the specific plugin Conf json.RawMessage `json:"conf,omitempty"` }
Plugin type and configuration
type Request ¶
type Request struct { // Conf specific for the plugin Conf json.RawMessage `json:"conf,omitempty"` // Version of the plugin Version string `json:"version"` // State action for the request State State `json:"state"` // ID for the container ID string `json:"id"` // SandboxID for the sandbox that the request belongs to // // If ID and SandboxID are the same, this is a request for the sandbox // SandboxID is empty for a non sandboxed container SandboxID string `json:"sandboxID,omitempty"` // Pid of the container // // -1 if there is no pid Pid int `json:"pid,omitempty"` // Spec generated from the OCI runtime specification Spec *Spec `json:"spec"` // Labels of a sandbox Labels map[string]string `json:"labels,omitempty"` // Results from previous plugins in the chain Results []*Result `json:"results,omitempty"` }
Request for a plugin invocation
type Result ¶
type Result struct { // Plugin name that populated the result Plugin string `json:"plugin"` // Version of the plugin Version string `json:"version"` // Error message in case of failures Error string `json:"error"` // Metadata specific to actions taken by the plugin Metadata map[string]string `json:"metadata,omitempty"` }
Result of the plugin invocation
type Spec ¶
type Spec struct { // Resources struct from the OCI specification // // Can be WindowsResources or LinuxResources Resources json.RawMessage `json:"resources"` // Namespaces for the container Namespaces map[string]string `json:"namespaces,omitempty"` // CgroupsPath for the container CgroupsPath string `json:"cgroupsPath,omitempty"` // Annotations passed down to the OCI runtime specification Annotations map[string]string `json:"annotations,omitempty"` }
Spec for the container being processed
type State ¶
type State string
State of the request
const ( // Create the initial resource for the container Create State = "create" // Delete any resources for the container Delete State = "delete" // Update the resources for the container Update State = "update" // Pause action of the container Pause State = "pause" // Resume action for the container Resume State = "resume" )
Click to show internal directories.
Click to hide internal directories.