Documentation ¶
Index ¶
- Constants
- type Store
- func (s *Store) Close() error
- func (s *Store) LastReservedIP(rangeID string) (net.IP, error)
- func (s *Store) Lock() error
- func (s *Store) Release(ip net.IP) error
- func (s *Store) ReleaseByID(id string) error
- func (s *Store) Reserve(id string, ip net.IP, rangeID string) (bool, error)
- func (s *Store) Unlock() error
Constants ¶
View Source
const ETCDPrefix string = "/etcd-macvlan-cni/networks"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct { EtcdClient *clientv3.Client EtcdKeyPrefix string // contains filtered or unexported fields }
Store is a simple disk-backed store that creates one file per IP address in a given directory. The contents of the file are the container ID.
func (*Store) LastReservedIP ¶
LastReservedIP returns the last reserved IP if exists
func (*Store) ReleaseByID ¶
N.B. This function eats errors to be tolerant and release as much as possible
Click to show internal directories.
Click to hide internal directories.