Documentation ¶
Index ¶
- type IPDB
- func (ix *IPDB) AddPermanentClient(ip net.IP, duid d.Duid) error
- func (ix *IPDB) DisableDynamic()
- func (ix *IPDB) FindIP(ctx context.Context, isFree func(context.Context, net.IP) bool, ip net.IP, ...) (net.IP, error)
- func (ix *IPDB) InManagedRange(ip net.IP) bool
- func (ix *IPDB) LookupClientByDuid(duid d.Duid) (net.IP, error)
- func (ix *IPDB) SetDynamicRange(begin, end net.IP) error
- func (ix *IPDB) UpdateClient(ip net.IP, duid d.Duid, ttl time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPDB ¶
func (*IPDB) AddPermanentClient ¶
AddPermanentClient injects a new client and marks it as permanent. While the lease may expire, the ip<>duid mapping will not.
func (*IPDB) DisableDynamic ¶
func (ix *IPDB) DisableDynamic()
DisableDynamic configures ipdb to only hand out pre-configured (or still existing) leases. No search will be performed for dynamic leases.
func (*IPDB) FindIP ¶
func (ix *IPDB) FindIP(ctx context.Context, isFree func(context.Context, net.IP) bool, ip net.IP, duid d.Duid) (net.IP, error)
FindIP attempts to find an IP for given duid, having a bias for the suggested IP.
func (*IPDB) InManagedRange ¶
InManagedRange returns 'true' if given ip is in the network range we manage.
func (*IPDB) SetDynamicRange ¶
SetDynamicRange configures the pool range to find dynamic IPs.
Click to show internal directories.
Click to hide internal directories.