config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package config provides configuration file support for the wgipamd server.

Index

Constants

This section is empty.

Variables

View Source
var Default = "" /* 1843-byte string literal not displayed */

Default is the toml representation of the default configuration.

Functions

This section is empty.

Types

type Config

type Config struct {
	Storage    Storage
	Interfaces []Interface
	Debug      Debug
}

Config specifies the configuration for wgipamd.

func Parse

func Parse(r io.Reader) (*Config, error)

Parse parses a Config in toml format from an io.Reader and verifies that the configuration is valid.

type Debug

type Debug struct {
	Address    string `toml:"address"`
	Prometheus bool   `toml:"prometheus"`
	PProf      bool   `toml:"pprof"`
}

Debug provides configuration for debugging and observability.

type Interface

type Interface struct {
	Name          string
	LeaseDuration time.Duration
	Subnets       []wgipam.Subnet
}

An Interface provides configuration for an individual interface.

type Storage

type Storage struct {
	Memory bool
	File   string
}

Storage provides configuration for storage backends.

Jump to

Keyboard shortcuts

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