Documentation ¶
Index ¶
- type BoltStore
- func (s *BoltStore) Close() error
- func (s *BoltStore) DeleteDevice(d *models.Device) error
- func (s *BoltStore) Flush()
- func (s *BoltStore) ForEachDevice(foreach func(*models.Device)) error
- func (s *BoltStore) ForEachLease(foreach func(*models.Lease)) error
- func (s *BoltStore) GetDevice(mac net.HardwareAddr) (*models.Device, error)
- func (s *BoltStore) GetLease(ip net.IP) (*models.Lease, error)
- func (s *BoltStore) PutDevice(d *models.Device) error
- func (s *BoltStore) PutLease(l *models.Lease) error
- type MemoryStore
- func (s *MemoryStore) Close() error
- func (s *MemoryStore) DeleteDevice(d *models.Device) error
- func (s *MemoryStore) ForEachDevice(foreach func(*models.Device)) error
- func (s *MemoryStore) ForEachLease(foreach func(*models.Lease)) error
- func (s *MemoryStore) GetDevice(mac net.HardwareAddr) (*models.Device, error)
- func (s *MemoryStore) GetLease(ip net.IP) (*models.Lease, error)
- func (s *MemoryStore) PutDevice(d *models.Device) error
- func (s *MemoryStore) PutLease(l *models.Lease) error
- type MySQLStore
- func (s *MySQLStore) Close() error
- func (s *MySQLStore) DeleteDevice(d *models.Device) error
- func (s *MySQLStore) ForEachDevice(foreach func(*models.Device)) error
- func (s *MySQLStore) ForEachLease(foreach func(*models.Lease)) error
- func (s *MySQLStore) GetDevice(mac net.HardwareAddr) (*models.Device, error)
- func (s *MySQLStore) GetLease(ip net.IP) (*models.Lease, error)
- func (s *MySQLStore) PutDevice(d *models.Device) error
- func (s *MySQLStore) PutLease(l *models.Lease) error
- type PGStore
- func (s *PGStore) DeleteDevice(d *models.Device) error
- func (s *PGStore) ForEachDevice(foreach func(*models.Device)) error
- func (s *PGStore) ForEachLease(foreach func(*models.Lease)) error
- func (s *PGStore) GetDevice(mac net.HardwareAddr) (*models.Device, error)
- func (s *PGStore) GetLease(ip net.IP) (*models.Lease, error)
- func (s *PGStore) PutDevice(d *models.Device) error
- func (s *PGStore) PutLease(l *models.Lease) error
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoltStore ¶
type BoltStore struct {
// contains filtered or unexported fields
}
func NewBoltStore ¶
func (*BoltStore) ForEachDevice ¶
func (*BoltStore) ForEachLease ¶
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
func NewMemoryStore ¶
func NewMemoryStore() (*MemoryStore, error)
func (*MemoryStore) Close ¶
func (s *MemoryStore) Close() error
func (*MemoryStore) DeleteDevice ¶
func (s *MemoryStore) DeleteDevice(d *models.Device) error
func (*MemoryStore) ForEachDevice ¶
func (s *MemoryStore) ForEachDevice(foreach func(*models.Device)) error
func (*MemoryStore) ForEachLease ¶
func (s *MemoryStore) ForEachLease(foreach func(*models.Lease)) error
func (*MemoryStore) GetDevice ¶
func (s *MemoryStore) GetDevice(mac net.HardwareAddr) (*models.Device, error)
type MySQLStore ¶
type MySQLStore struct {
// contains filtered or unexported fields
}
func NewMySQLStore ¶
func NewMySQLStore(cfg *mysql.Config, leaseTable, deviceTable string) (*MySQLStore, error)
func (*MySQLStore) Close ¶
func (s *MySQLStore) Close() error
func (*MySQLStore) DeleteDevice ¶
func (s *MySQLStore) DeleteDevice(d *models.Device) error
func (*MySQLStore) ForEachDevice ¶
func (s *MySQLStore) ForEachDevice(foreach func(*models.Device)) error
func (*MySQLStore) ForEachLease ¶
func (s *MySQLStore) ForEachLease(foreach func(*models.Lease)) error
func (*MySQLStore) GetDevice ¶
func (s *MySQLStore) GetDevice(mac net.HardwareAddr) (*models.Device, error)
type PGStore ¶
type PGStore struct { *MySQLStore // contains filtered or unexported fields }
func NewPGStore ¶
type Store ¶
type Store interface { Close() error GetLease(ip net.IP) (*models.Lease, error) PutLease(l *models.Lease) error ForEachLease(foreach func(*models.Lease)) error GetDevice(mac net.HardwareAddr) (*models.Device, error) PutDevice(d *models.Device) error DeleteDevice(d *models.Device) error ForEachDevice(foreach func(*models.Device)) error }
Click to show internal directories.
Click to hide internal directories.