Documentation ¶
Index ¶
- Constants
- type Storage
- func (s *Storage) Create(ctx context.Context, ip net.IP, clientID string, leased bool, ...) error
- func (s *Storage) Delete(ctx context.Context, ip net.IP, clientID string) error
- func (s *Storage) FindByID(ctx context.Context, clientID string) (net.IP, bool, time.Time, error)
- func (s *Storage) FindByIP(ctx context.Context, ip net.IP) (string, bool, time.Time, error)
- func (s *Storage) ListIDs(ctx context.Context) ([]string, error)
- func (s *Storage) ListIPs(ctx context.Context) ([]net.IP, error)
- func (s *Storage) Update(ctx context.Context, ip net.IP, clientID string, leased bool, ...) error
Constants ¶
View Source
const SchemaVersion = "1"
SchemaVersion is the current version of the bolt db
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
Storage is a storage.LeaseStorage implementation that persists IP leases in a bbolt database
func (*Storage) Create ¶
func (s *Storage) Create(ctx context.Context, ip net.IP, clientID string, leased bool, expiration time.Time) error
Create implements lease.Storage
Click to show internal directories.
Click to hide internal directories.