config

package
v0.0.0-...-fe16607 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package config Parse and create config objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(input map[string]interface{}) map[string]*Target

Parse Parse the configuration into a target map.

Types

type Latency

type Latency struct {
	Min int `json:"min" mapstructure:"min"`
	Max int `json:"max" mapstructure:"max"`
}

Latency Hold the maximal and minimal latency.

type Target

type Target struct {
	ID         string   `json:"id"`
	Protocol   string   `json:"protocol" mapstructure:"protocol"`
	Target     string   `json:"target" mapstructure:"target"`
	Bandwidth  int      `json:"bandwidth" mapstructure:"bandwidth"`
	Overhead   string   `json:"overhead" mapstructure:"overhead"`
	Latency    *Latency `json:"latency" mapstructure:"latency"`
	LossRate   float64  `json:"loss_rate" mapstructure:"loss_rate"`
	ListenPort int      `json:"listen_port" mapstructure:"listen_port"`
}

Target Represent a target in the configuration.

Jump to

Keyboard shortcuts

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