app

package
v0.0.0-...-4db66e5 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Endpoints etcd
	Endpoints []string
)

Functions

func IP2long

func IP2long(ipAddr string) (uint32, error)

IP2long ...

func IPHandler

func IPHandler(w http.ResponseWriter, r *http.Request)

IPHandler according to request args and return IP

func InitStore

func InitStore() error

InitStore ...

func Long2IPNet

func Long2IPNet(ipLong uint32) net.IP

Long2IPNet ...

func Long2ip

func Long2ip(ipLong uint32) string

Long2ip ...

Types

type DelIPReq

type DelIPReq struct {
	Dev         string `json:"dev"`
	ContainerID string `json:"containerID"`
}

DelIPReq ...

type IPAM

type IPAM struct {
	Type  string    `json:"type"`
	Range RangeSet  `json:"range"`
	DNS   types.DNS `json:"dns"`
}

IPAM ip address mangagement

type IPSet

type IPSet map[string]string

IPSet ...

type Net

type Net struct {
	Version string `json:"cniVersion"`
	Name    string `json:"name"`
	Type    string `json:"type"`
	Master  string `json:"master"`
	Mode    string `json:"mode"`
	IPAM    IPAM   `json:"ipam"`
}

Net cni configuration

type Range

type Range struct {
	Dev    string `json:"dev"`
	Subnet string `json:"subnet"`
	Start  string `json:"start"`
	End    string `json:"end"`
	GW     string `json:"gw"`
}

Range ...

type RangeSet

type RangeSet []Range

RangeSet ...

Jump to

Keyboard shortcuts

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