Help us shape the future of Go! Take the 2026 Go Developer Survey

api

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2015 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventType

type EventType string
const (
	Added   EventType = "ADDED"
	Deleted EventType = "DELETED"
)

type NamespaceEvent

type NamespaceEvent struct {
	Type EventType
	Name string
}

type NetNamespace

type NetNamespace struct {
	Name  string
	NetID uint
}

type NetNamespaceEvent

type NetNamespaceEvent struct {
	Type  EventType
	Name  string
	NetID uint
}

type NodeEvent

type NodeEvent struct {
	Type     EventType
	NodeName string
	NodeIP   string
}

type Subnet

type Subnet struct {
	NodeIP   string
	SubnetIP string
}

type SubnetEvent

type SubnetEvent struct {
	Type     EventType
	NodeName string
	Subnet   Subnet
}

type SubnetRegistry

type SubnetRegistry interface {
	InitSubnets() error
	GetSubnets() (*[]Subnet, error)
	GetSubnet(nodeName string) (*Subnet, error)
	DeleteSubnet(nodeName string) error
	CreateSubnet(sn string, sub *Subnet) error
	WatchSubnets(receiver chan *SubnetEvent, stop chan bool) error

	InitNodes() error
	GetNodes() (*[]string, error)
	CreateNode(nodeName string, data string) error
	WatchNodes(receiver chan *NodeEvent, stop chan bool) error

	WriteNetworkConfig(network string, subnetLength uint) error
	GetContainerNetwork() (string, error)
	GetSubnetLength() (uint64, error)
	CheckEtcdIsAlive(seconds uint64) bool

	WatchNamespaces(receiver chan *NamespaceEvent, stop chan bool) error
	WatchNetNamespaces(receiver chan *NetNamespaceEvent, stop chan bool) error
	GetNetNamespaces() ([]NetNamespace, error)
	GetNetNamespace(name string) (NetNamespace, error)
	WriteNetNamespace(name string, id uint) error
	DeleteNetNamespace(name string) error
}

Jump to

Keyboard shortcuts

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