leaseopts

package
v0.0.0-...-11e78ec Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetClientOverrides

func SetClientOverrides(original *LeaseOptions, client *pb.ClientConfig) error

setClientOverrides updates the given leaseOptions pointer and overwrites values with the configuration found in the given clientConfig.

Types

type LeaseOptions

type LeaseOptions struct {
	IP            net.IP        // Static IP of a lease.
	Domain        string        // Domain to announce.
	Hostname      string        // Hostname to use.
	Netmask       net.IPMask    // Netmask of the network we announce.
	Router        net.IP        // Router to use.
	DNS           []net.IP      // List of DNS suggested to the client.
	NTP           []net.IP      // List of NTP servers suggested to the client.
	LeaseDuration time.Duration // Duration of the announced lease.
}

func ParseConfig

func ParseConfig(conf *pb.ServerConfig) (*LeaseOptions, *net.IPNet, error)

ParseConfig inspects a proto.ServerConfig and returns the configured lease options and the IPNet we are reposible for.

Jump to

Keyboard shortcuts

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