api

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2015 License: Apache-2.0 Imports: 0 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

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"
	Modified EventType = "MODIFIED"
)

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 Node

type Node struct {
	Name string
	IP   string
}

type NodeEvent

type NodeEvent struct {
	Type EventType
	Node Node
}

type Pod

type Pod struct {
	Name        string
	Namespace   string
	ContainerID string
}

type Service

type Service struct {
	Name      string
	Namespace string
	UID       string
	IP        string
	Ports     []ServicePort
}

type ServiceEvent

type ServiceEvent struct {
	Type    EventType
	Service Service
}

type ServicePort

type ServicePort struct {
	Protocol ServiceProtocol
	Port     uint
}

type ServiceProtocol

type ServiceProtocol string
const (
	TCP ServiceProtocol = "TCP"
	UDP ServiceProtocol = "UDP"
)

type Subnet

type Subnet struct {
	NodeIP     string
	SubnetCIDR string
}

type SubnetEvent

type SubnetEvent struct {
	Type     EventType
	NodeName string
	Subnet   Subnet
}

type SubnetRegistry

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

	GetNodes() ([]Node, string, error)
	WatchNodes(receiver chan<- *NodeEvent, ready chan<- bool, startVersion <-chan string, stop <-chan bool) error

	WriteNetworkConfig(clusterNetworkCIDR string, clusterBitsPerSubnet uint, serviceNetworkCIDR string) error
	GetClusterNetworkCIDR() (string, error)

	GetNamespaces() ([]string, string, error)
	WatchNamespaces(receiver chan<- *NamespaceEvent, ready chan<- bool, startVersion <-chan string, stop <-chan bool) error

	WatchNetNamespaces(receiver chan<- *NetNamespaceEvent, ready chan<- bool, startVersion <-chan string, stop <-chan bool) error
	GetNetNamespaces() ([]NetNamespace, string, error)
	GetNetNamespace(name string) (NetNamespace, error)
	WriteNetNamespace(name string, id uint) error
	DeleteNetNamespace(name string) error

	GetServicesNetworkCIDR() (string, error)
	GetServices() ([]Service, string, error)
	WatchServices(receiver chan<- *ServiceEvent, ready chan<- bool, startVersion <-chan string, stop <-chan bool) error
	GetServicesForNamespace(namespace string) ([]Service, error)

	GetPods() ([]Pod, string, error)
	WatchPods(ready chan<- bool, startVersion <-chan string, stop <-chan bool) error
	GetRunningPods(nodeName, namespace string) ([]Pod, error)
}

Jump to

Keyboard shortcuts

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