Documentation ¶
Index ¶
- Constants
- Variables
- func CleanHangingAllocation(hostName string) error
- func FindAvailableIndex(indexes []int, leftIndex int) int
- func FlushExpiredHistory()
- func GenerateAllocateIndexes(allocations []backend.Allocation, maxIndex int, excludes []ExcludeRange) []int
- type ExcludeRange
- type IPRequest
- type IPResponse
- type IPValue
Constants ¶
View Source
const ( SHIFT_BYTE_VAL = 256 HISTORY_TIMEOUT = 60 // seconds HOSTNAME_LABEL_NAME = "hostname" DEFNAME_LABEL_NAME = "netname" )
Variables ¶
View Source
var IppoolHandler *backend.IPPoolHandler
View Source
var K8sClientset *kubernetes.Clientset
Functions ¶
func CleanHangingAllocation ¶
func FindAvailableIndex ¶
func FlushExpiredHistory ¶
func FlushExpiredHistory()
func GenerateAllocateIndexes ¶
func GenerateAllocateIndexes(allocations []backend.Allocation, maxIndex int, excludes []ExcludeRange) []int
Types ¶
type ExcludeRange ¶
func (ExcludeRange) Contains ¶
func (r ExcludeRange) Contains(index int) bool
type IPRequest ¶
type IPRequest struct { PodName string `json:"pod"` PodNamespace string `json:"namespace"` HostName string `json:"host"` NetAttachDefName string `json:"def"` InterfaceNames []string `json:"masters"` }
For IPAM Allocation/Deallocation
type IPResponse ¶
type IPResponse struct { InterfaceName string `json:"interface"` IPAddress string `json:"ip"` VLANBlockSize string `json:"block"` }
func AllocateIP ¶
func AllocateIP(req IPRequest) []IPResponse
func DeallocateIP ¶
func DeallocateIP(req IPRequest) []IPResponse
Click to show internal directories.
Click to hide internal directories.