dhcp

package
v2.3.9 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewDHCPManager

func NewDHCPManager(client corev1.ConfigMapInterface, namespace string) *Manager

func (*Manager) ForEach

func (m *Manager) ForEach(ctx context.Context, fnv4 func(net.IP), fnv6 func(net.IP)) error

func (*Manager) Get

func (m *Manager) Get(ctx context.Context, key string) (string, error)

func (*Manager) GetClusterID

func (m *Manager) GetClusterID() types.UID

func (*Manager) InitDHCP

func (m *Manager) InitDHCP(ctx context.Context) error

InitDHCP TODO optimize dhcp, using mac address, ip and deadline as unit

func (*Manager) ReleaseIP

func (m *Manager) ReleaseIP(ctx context.Context, ips ...net.IP) error

func (*Manager) RentIP

func (m *Manager) RentIP(ctx context.Context) (*net.IPNet, *net.IPNet, error)

func (*Manager) Set

func (m *Manager) Set(ctx context.Context, key, value string) error

type Server

type Server struct {
	rpc.UnimplementedDHCPServer

	sync.Mutex
	// contains filtered or unexported fields
}

func NewServer

func NewServer(clientset *kubernetes.Clientset) *Server

func (*Server) ReleaseIP

func (s *Server) ReleaseIP(ctx context.Context, req *rpc.ReleaseIPRequest) (*rpc.ReleaseIPResponse, error)

func (*Server) RentIP

func (s *Server) RentIP(ctx context.Context, req *rpc.RentIPRequest) (*rpc.RentIPResponse, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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