func (c *Config) Validate() error {
	err := c.validatePaths()
	if err != nil {
		return fmt.Errorf("Path validation failed: %v", err)
	}
	err = c.validateRouters()
	if err != nil {
		return fmt.Errorf("Router validation failed: %v", err)
	}
	return nil
}
Validate validates a configuration
package config
import (
	"bytes"
	"encoding/binary"
	"fmt"
	"net"
	"github.com/exaring/matroschka-prober/pkg/prober"
	"github.com/pkg/errors"
)
var (
	dfltBasePort = uint16(32768)
	dfltClass    = Class{
		Name: "BE",
		TOS:  0x00,
	}
	dfltTimeoutMS           = uint64(500)
	dfltListenAddress       = ":9517"
	dfltMeasurementLengthMS = uint64(1000)
	dfltPayloadSizeBytes    = uint64(0)
	dfltPPS                 = uint64(25)
	dfltSrcRange            = "169.254.0.0/16"
	dfltMetricsPath         = "/metrics"
)
type Config struct {
	Version       string
	MetricsPath   *string   `yaml:"metrcis_path"`
	ListenAddress *string   `yaml:"listen_address"`
	BasePort      *uint16   `yaml:"base_port"`
	Defaults      *Defaults `yaml:"defaults"`
	SrcRange      *string   `yaml:"src_range"`
	Classes       []Class   `yaml:"classes"`
	Paths         []Path    `yaml:"paths"`
	Routers       []Router  `yaml:"routers"`
}
type Defaults struct {
	MeasurementLengthMS *uint64 `yaml:"measurement_length_ms"`
	PayloadSizeBytes    *uint64 `yaml:"payload_size_bytes"`
	PPS                 *uint64 `yaml:"pps"`
	SrcRange            *string `yaml:"src_range"`
	TimeoutMS           *uint64 `yaml:"timeout"`
	SrcInterface        *string `yaml:"src_interface"`
}
type Class struct {
	Name string `yaml:"name"`
	TOS  uint8  `yaml:"tos"`
}
type Path struct {
	Name                string   `yaml:"name"`
	Hops                []string `yaml:"hops"`
	MeasurementLengthMS *uint64  `yaml:"measurement_length_ms"`
	PayloadSizeBytes    *uint64  `yaml:"payload_size_bytes"`
	PPS                 *uint64  `yaml:"pps"`
	TimeoutMS           *uint64  `yaml:"timeout"`
}
type Router struct {
	Name     string `yaml:"name"`
	DstRange string `yaml:"dst_range"`
	SrcRange string `yaml:"src_range"`
}