etcd

package
v0.19.11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLocalManager

func NewLocalManager(ctx context.Context, config *EtcdConfig, prevSubnet ip.IP4Net, prevIPv6Subnet ip.IP6Net) (Manager, error)

func NewMockManager

func NewMockManager(registry *MockSubnetRegistry) subnet.Manager

func NewMockManagerWithSubnet

func NewMockManagerWithSubnet(registry *MockSubnetRegistry, sn ip.IP4Net, sn6 ip.IP6Net) subnet.Manager

Types

type EtcdConfig

type EtcdConfig struct {
	Endpoints []string
	Keyfile   string
	Certfile  string
	CAFile    string
	Prefix    string
	Username  string
	Password  string
}

type LocalManager

type LocalManager struct {
	// contains filtered or unexported fields
}

func (*LocalManager) AcquireLease

func (m *LocalManager) AcquireLease(ctx context.Context, attrs *LeaseAttrs) (*Lease, error)

func (*LocalManager) GetNetworkConfig

func (m *LocalManager) GetNetworkConfig(ctx context.Context) (*Config, error)

func (*LocalManager) Name

func (m *LocalManager) Name() string

func (*LocalManager) RenewLease

func (m *LocalManager) RenewLease(ctx context.Context, lease *Lease) error

func (*LocalManager) WatchLease

func (m *LocalManager) WatchLease(ctx context.Context, sn ip.IP4Net, sn6 ip.IP6Net, cursor interface{}) (LeaseWatchResult, error)

func (*LocalManager) WatchLeases

func (m *LocalManager) WatchLeases(ctx context.Context, cursor interface{}) (LeaseWatchResult, error)

type MockSubnetRegistry

type MockSubnetRegistry struct {
	// contains filtered or unexported fields
}

func NewMockRegistry

func NewMockRegistry(config string, initialSubnets []Lease) *MockSubnetRegistry

type Registry

type Registry interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL