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.
Click to show internal directories.
Click to hide internal directories.