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: 163

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