config

package
v0.0.0-...-9da7c9a Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfigFromFile

func LoadConfigFromFile(filename string) (map[string]Config, error)

Types

type Config

type Config struct {
	ControlPort       int        `yaml:"controlPort"`
	SenderPortRange   PortRange  `yaml:"senderPortRange"`
	ReceiverPortRange PortRange  `yaml:"receiverPortRange"`
	Count             int        `yaml:"count"`
	Timeout           int        `yaml:"timeout"`
	IP                IPProtocol `yaml:"ip"`
}

func (*Config) UnmarshalYAML

func (s *Config) UnmarshalYAML(unmarshal func(interface{}) error) error

func (Config) Validate

func (c Config) Validate() error

type IPProtocol

type IPProtocol struct {
	Version  int  `yaml:"version"`
	Fallback bool `yaml:"fallback"`
}

type PortRange

type PortRange struct {
	From int `yaml:"from"`
	To   int `yaml:"to"`
}

func (PortRange) Validate

func (p PortRange) Validate() error

Jump to

Keyboard shortcuts

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