Documentation ¶
Index ¶
- Constants
- type BaseAttrs
- type Config
- type Event
- type EventBatch
- type EventType
- type SubnetLease
- type SubnetManager
- func (sm *SubnetManager) AcquireLease(extIP ip.IP4, data interface{}, cancel chan bool) (ip.IP4Net, error)
- func (sm *SubnetManager) GetConfig() *Config
- func (sm *SubnetManager) LeaseRenewer(cancel chan bool)
- func (sm *SubnetManager) UpdateSubnet(data string) error
- func (sm *SubnetManager) WatchLeases(receiver chan EventBatch, cancel chan bool)
Constants ¶
View Source
const ( SubnetAdded = iota SubnetRemoved )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Network ip.IP4Net SubnetMin ip.IP4 SubnetMax ip.IP4 SubnetLen uint Backend json.RawMessage }
func ParseConfig ¶
type Event ¶
type Event struct { Type EventType Lease SubnetLease }
type EventBatch ¶
type EventBatch []Event
type SubnetLease ¶
type SubnetManager ¶
type SubnetManager struct {
// contains filtered or unexported fields
}
func NewSubnetManager ¶
func NewSubnetManager(etcdEndpoint, prefix string) (*SubnetManager, error)
func (*SubnetManager) AcquireLease ¶
func (*SubnetManager) GetConfig ¶
func (sm *SubnetManager) GetConfig() *Config
func (*SubnetManager) LeaseRenewer ¶
func (sm *SubnetManager) LeaseRenewer(cancel chan bool)
func (*SubnetManager) UpdateSubnet ¶
func (sm *SubnetManager) UpdateSubnet(data string) error
func (*SubnetManager) WatchLeases ¶
func (sm *SubnetManager) WatchLeases(receiver chan EventBatch, cancel chan bool)
Click to show internal directories.
Click to hide internal directories.