Documentation ¶
Index ¶
- type LeaseManager
- type LeaseManagerImpl
- func (l *LeaseManagerImpl) Blacklist(ips ...string) error
- func (l *LeaseManagerImpl) GetNetIP() string
- func (l *LeaseManagerImpl) IsBlacklisted(ip string) (bool, error)
- func (l *LeaseManagerImpl) IsLeased(ip string) (bool, error)
- func (l *LeaseManagerImpl) Lease(ips ...string) ([]string, error)
- func (l *LeaseManagerImpl) NetContains(ip string) bool
- func (l *LeaseManagerImpl) RemoveBlacklisted(ips ...string) error
- func (l *LeaseManagerImpl) RemoveLeased(ips ...string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LeaseManager ¶
type LeaseManager interface { NetContains(string) bool GetNetIP() string Blacklist(...string) error IsBlacklisted(string) (bool, error) RemoveBlacklisted(...string) error Lease(...string) ([]string, error) IsLeased(string) (bool, error) RemoveLeased(...string) error }
func NewLeaseManager ¶
func NewLeaseManager(cidr string) (LeaseManager, error)
func NewLeaseManagerWithState ¶
func NewLeaseManagerWithState(cidr string, leases, blacklist []string) (LeaseManager, error)
type LeaseManagerImpl ¶
type LeaseManagerImpl struct {
// contains filtered or unexported fields
}
func (*LeaseManagerImpl) Blacklist ¶
func (l *LeaseManagerImpl) Blacklist(ips ...string) error
func (*LeaseManagerImpl) GetNetIP ¶
func (l *LeaseManagerImpl) GetNetIP() string
func (*LeaseManagerImpl) IsBlacklisted ¶
func (l *LeaseManagerImpl) IsBlacklisted(ip string) (bool, error)
func (*LeaseManagerImpl) NetContains ¶
func (l *LeaseManagerImpl) NetContains(ip string) bool
func (*LeaseManagerImpl) RemoveBlacklisted ¶
func (l *LeaseManagerImpl) RemoveBlacklisted(ips ...string) error
func (*LeaseManagerImpl) RemoveLeased ¶
func (l *LeaseManagerImpl) RemoveLeased(ips ...string) error
Click to show internal directories.
Click to hide internal directories.