models

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2018 License: BSD-3-Clause Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	MAC         net.HardwareAddr
	Registered  bool
	Blacklisted bool
}

type Lease

type Lease struct {
	IP          net.IP
	MAC         net.HardwareAddr
	Network     string
	Start       time.Time
	End         time.Time
	Hostname    string
	IsAbandoned bool
	Offered     bool
	Registered  bool
}

A Lease represents a single DHCP lease in a pool. It is bound to a particular pool and network.

func NewLease

func NewLease() *Lease

func (*Lease) IsExpired

func (l *Lease) IsExpired() bool

func (*Lease) IsFree

func (l *Lease) IsFree() bool

IsFree determines if the lease is expired and available for use

func (*Lease) Serialize

func (l *Lease) Serialize() []byte

func (*Lease) Unserialize

func (l *Lease) Unserialize(data []byte) error

Jump to

Keyboard shortcuts

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