package types020
import "github.com/containernetworking/cni/pkg/types/020"
Index ¶
- Constants
- func NewResult(data []byte) (types.Result, error)
- type IPConfig
- func (i *IPConfig) Copy() *IPConfig
- func (c *IPConfig) MarshalJSON() ([]byte, error)
- func (c *IPConfig) UnmarshalJSON(data []byte) error
- type Result
Constants ¶
const ImplementedSpecVersion string = "0.2.0"
Functions ¶
func NewResult ¶
NewResult creates a new Result object from JSON data. The JSON data must be compatible with the CNI versions implemented by this type.
Types ¶
type IPConfig ¶
IPConfig contains values necessary to configure an interface
func (*IPConfig) Copy ¶
func (*IPConfig) MarshalJSON ¶
func (*IPConfig) UnmarshalJSON ¶
type Result ¶
type Result struct {
CNIVersion string `json:"cniVersion,omitempty"`
IP4 *IPConfig `json:"ip4,omitempty"`
IP6 *IPConfig `json:"ip6,omitempty"`
DNS types.DNS `json:"dns,omitempty"`
}
Result is what gets returned from the plugin (via stdout) to the caller
func GetResult ¶
GetResult converts the given Result object to the ImplementedSpecVersion and returns the concrete type or an error
func (*Result) GetAsVersion ¶
func (*Result) Print ¶
func (*Result) PrintTo ¶
func (*Result) Version ¶
Source Files ¶
- Version
- v1.3.0 (latest)
- Published
- Apr 7, 2025
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 4 months ago –
Tools for package owners.