net

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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) IsLeased

func (l *LeaseManagerImpl) IsLeased(ip string) (bool, error)

func (*LeaseManagerImpl) Lease

func (l *LeaseManagerImpl) Lease(ips ...string) ([]string, 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

Jump to

Keyboard shortcuts

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