Documentation ¶
Index ¶
- func NewLocalManager(ctx context.Context, config *EtcdConfig, prevSubnet ip.IP4Net, ...) (subnet.Manager, error)
- func NewMockManager(registry *MockSubnetRegistry) subnet.Manager
- func NewMockManagerWithSubnet(registry *MockSubnetRegistry, sn ip.IP4Net, sn6 ip.IP6Net) subnet.Manager
- type EtcdConfig
- type LocalManager
- func (m *LocalManager) AcquireLease(ctx context.Context, attrs *lease.LeaseAttrs) (*lease.Lease, error)
- func (m *LocalManager) CompleteLease(ctx context.Context, myLease *lease.Lease, wg *sync.WaitGroup) error
- func (m *LocalManager) GetNetworkConfig(ctx context.Context) (*subnet.Config, error)
- func (m *LocalManager) GetStoredMacAddresses(ctx context.Context) (string, string)
- func (m *LocalManager) GetStoredPublicIP(ctx context.Context) (string, string)
- func (m *LocalManager) HandleSubnetFile(path string, config *subnet.Config, ipMasq bool, sn ip.IP4Net, ...) error
- func (m *LocalManager) Name() string
- func (m *LocalManager) RenewLease(ctx context.Context, lease *lease.Lease) error
- func (m *LocalManager) WatchLease(ctx context.Context, sn ip.IP4Net, sn6 ip.IP6Net, ...) error
- func (m *LocalManager) WatchLeases(ctx context.Context, receiver chan []lease.LeaseWatchResult) error
- type MockSubnetRegistry
- type Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLocalManager ¶
func NewMockManager ¶
func NewMockManager(registry *MockSubnetRegistry) subnet.Manager
Types ¶
type EtcdConfig ¶
type LocalManager ¶
type LocalManager struct {
// contains filtered or unexported fields
}
func (*LocalManager) AcquireLease ¶
func (m *LocalManager) AcquireLease(ctx context.Context, attrs *lease.LeaseAttrs) (*lease.Lease, error)
func (*LocalManager) CompleteLease ¶
func (m *LocalManager) CompleteLease(ctx context.Context, myLease *lease.Lease, wg *sync.WaitGroup) error
CompleteLease monitor lease
func (*LocalManager) GetNetworkConfig ¶
func (*LocalManager) GetStoredMacAddresses ¶ added in v0.25.2
func (m *LocalManager) GetStoredMacAddresses(ctx context.Context) (string, string)
func (*LocalManager) GetStoredPublicIP ¶ added in v0.25.2
func (m *LocalManager) GetStoredPublicIP(ctx context.Context) (string, string)
func (*LocalManager) HandleSubnetFile ¶
func (m *LocalManager) HandleSubnetFile(path string, config *subnet.Config, ipMasq bool, sn ip.IP4Net, ipv6sn ip.IP6Net, mtu int) error
For etcd subnet manager, the file never changes so we just write it once at startup
func (*LocalManager) Name ¶
func (m *LocalManager) Name() string
func (*LocalManager) RenewLease ¶
func (*LocalManager) WatchLease ¶
func (m *LocalManager) WatchLease(ctx context.Context, sn ip.IP4Net, sn6 ip.IP6Net, receiver chan []lease.LeaseWatchResult) error
func (*LocalManager) WatchLeases ¶
func (m *LocalManager) WatchLeases(ctx context.Context, receiver chan []lease.LeaseWatchResult) error
type MockSubnetRegistry ¶
type MockSubnetRegistry struct {
// contains filtered or unexported fields
}
func NewMockRegistry ¶
func NewMockRegistry(config string, initialSubnets []lease.Lease) *MockSubnetRegistry
Click to show internal directories.
Click to hide internal directories.