spartan

package
v0.56.3 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const IfName string = "spartan"

Variables

View Source
var Config = Network{
	Name:      "spartan-network",
	Interface: IfName,
	IPAM: IPAM{
		Type:       "host-local",
		RangeStart: net.IPv4(198, 51, 100, 10),
		RangeEnd:   net.IPv4(198, 51, 100, 253),
		Subnet: types.IPNet{
			IP:   net.IPv4(198, 51, 100, 0),
			Mask: net.IPv4Mask(0xff, 0xff, 0xff, 0),
		},
	},
}

TODO(asridharan): This needs to be derived from the spartan configuration.

View Source
var IPs = []net.IPNet{
	net.IPNet{
		IP:   net.IPv4(198, 51, 100, 1),
		Mask: net.IPv4Mask(0xff, 0xff, 0xff, 0xff),
	},
	net.IPNet{
		IP:   net.IPv4(198, 51, 100, 2),
		Mask: net.IPv4Mask(0xff, 0xff, 0xff, 0xff),
	},
	net.IPNet{
		IP:   net.IPv4(198, 51, 100, 3),
		Mask: net.IPv4Mask(0xff, 0xff, 0xff, 0xff),
	},
}

TODO(asridharan): This needs to be derived from the spartan configuration.

Functions

func CniAdd

func CniAdd(args *skel.CmdArgs) error

func CniDel

func CniDel(args *skel.CmdArgs) error

Types

type Error

type Error string

func (Error) Error

func (err Error) Error() string

type IPAM

type IPAM struct {
	Type       string      `json:"type"`
	RangeStart net.IP      `json:"rangeStart"`
	RangeEnd   net.IP      `json:"rangeEnd"`
	Subnet     types.IPNet `json:"subnet"`
}

type NetConf

type NetConf struct {
	Enable bool `json:"enable", omitempty"`
}

type Network

type Network struct {
	Name      string `json:"name"`
	Interface string `json:"spartanInterface"`
	IPAM      IPAM   `json:"ipam"`
}

Jump to

Keyboard shortcuts

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