Documentation
¶
Index ¶
- type ConfigListdeprecated
- type Plugindeprecated
- type Requestdeprecated
- func (r *Request) IsSandbox() booldeprecated
- func (r *Request) NewResult(plugin string) *Resultdeprecated
- type Resultdeprecated
- func (r *Result) Err() errordeprecated
- type Specdeprecated
- type Statedeprecated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigList
deprecated
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
Deprecated: NRI 0.1.0-style plugins should only be used through the v010-adapter plugin
type Plugin
deprecated
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
Deprecated: NRI 0.1.0-style plugins should only be used through the v010-adapter plugin
type Request
deprecated
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
Deprecated: NRI 0.1.0-style plugins should only be used through the v010-adapter plugin
type Result
deprecated
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
Deprecated: NRI 0.1.0-style plugins should only be used through the v010-adapter plugin
type Spec
deprecated
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
Deprecated: NRI 0.1.0-style plugins should only be used through the v010-adapter plugin
type State
deprecated
type State string
State of the request
Deprecated: NRI 0.1.0-style plugins should only be used through the v010-adapter plugin
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" )