Documentation ¶
Index ¶
- type Allocator
- func (a *Allocator) Allocate(svcKey string, svc *v1.Service, serviceIPFamily ipfamily.Family, ports []Port, ...) ([]net.IP, error)
- func (a *Allocator) AllocateFromPool(svcKey string, svc *v1.Service, serviceIPFamily ipfamily.Family, ...) ([]net.IP, error)
- func (a *Allocator) Assign(svcKey string, svc *v1.Service, ips []net.IP, ports []Port, ...) error
- func (a *Allocator) IPs(svc string) []net.IP
- func (a *Allocator) Pool(svc string) string
- func (a *Allocator) PoolForIP(ips []net.IP) *config.Pool
- func (a *Allocator) SetPools(pools *config.Pools)
- func (a *Allocator) Unassign(svc string)
- type Port
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Allocator ¶
type Allocator struct {
// contains filtered or unexported fields
}
An Allocator tracks IP address pools and allocates addresses from them.
func (*Allocator) Allocate ¶
func (a *Allocator) Allocate(svcKey string, svc *v1.Service, serviceIPFamily ipfamily.Family, ports []Port, sharingKey, backendKey string) ([]net.IP, error)
Allocate assigns any available and assignable IP to service.
func (*Allocator) AllocateFromPool ¶
func (a *Allocator) AllocateFromPool(svcKey string, svc *v1.Service, serviceIPFamily ipfamily.Family, poolName string, ports []Port, sharingKey, backendKey string) ([]net.IP, error)
AllocateFromPool assigns an available IP from pool to service.
func (*Allocator) Assign ¶
func (a *Allocator) Assign(svcKey string, svc *v1.Service, ips []net.IP, ports []Port, sharingKey, backendKey string) error
Assign assigns the requested ip to svc, if the assignment is permissible by sharingKey and backendKey.
func (*Allocator) Pool ¶ added in v0.3.0
Pool returns the pool from which service's IP was allocated. If service has no IP allocated, "" is returned.
func (*Allocator) PoolForIP ¶ added in v0.14.0
PoolForIP returns the pool structure associated with an IP.
Click to show internal directories.
Click to hide internal directories.