types020

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2021 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ImplementedSpecVersion string = "0.2.0"

Variables

View Source
var SupportedVersions = []string{"", "0.1.0", ImplementedSpecVersion}

Functions

func NewResult

func NewResult(data []byte) (types.Result, error)

Types

type IPConfig

type IPConfig struct {
	IP      net.IPNet
	Gateway net.IP
	Routes  []types.Route
}

IPConfig contains values necessary to configure an interface

func (*IPConfig) MarshalJSON

func (c *IPConfig) MarshalJSON() ([]byte, error)

func (*IPConfig) UnmarshalJSON

func (c *IPConfig) UnmarshalJSON(data []byte) error

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

func GetResult(r types.Result) (*Result, error)

func (*Result) GetAsVersion

func (r *Result) GetAsVersion(version string) (types.Result, error)

func (*Result) Print

func (r *Result) Print() error

func (*Result) PrintTo added in v0.7.0

func (r *Result) PrintTo(writer io.Writer) error

func (*Result) Version

func (r *Result) Version() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL