grunge

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lease

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

func (*Lease) IPv4

func (l *Lease) IPv4() netip.Prefix

func (*Lease) IPv6

func (l *Lease) IPv6() netip.Prefix

type Network

type Network struct {
	NetworkOptions
	// contains filtered or unexported fields
}

func NewNetwork

func NewNetwork(log *slog.Logger, opts NetworkOptions) (*Network, error)

func (*Network) AllLeases

func (n *Network) AllLeases(ctx context.Context) ([]lease.Lease, error)

func (*Network) Lease

func (n *Network) Lease() *Lease

func (*Network) SetupConfig

func (n *Network) SetupConfig(ctx context.Context, v4, v6 netip.Prefix) error

func (*Network) Start

func (n *Network) Start(ctx context.Context, eg *errgroup.Group) error

type NetworkOptions

type NetworkOptions struct {
	EtcdEndpoints []string
	EtcdPrefix    string
	Interface     string
	BackendType   string

	PrevIPv4 netip.Prefix
	PrevIPv6 netip.Prefix

	// TLS configuration for etcd mTLS (optional, file paths)
	TLSCertFile string // Client certificate file path
	TLSKeyFile  string // Client private key file path
	TLSCAFile   string // CA certificate file path
}

Jump to

Keyboard shortcuts

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