config

package
v0.0.0-...-f3b18db Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// DefaultTargetGroup sets the default configuration for the TargetGroup
	DefaultTargetGroup = TargetGroup{
		Interval: time.Second,
		Network:  "ip",
		Protocol: "icmp",
		Size:     56,
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Targets []TargetGroup `yaml:"targets"`
}

func (*Config) UnmarshalYAML

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

UnmarshalYAML implements the yaml.Unmarshaler interface.

type SafeConfig

type SafeConfig struct {
	sync.RWMutex
	C *Config
}

func (*SafeConfig) ReloadConfig

func (sc *SafeConfig) ReloadConfig(confFile string) (err error)

type TargetGroup

type TargetGroup struct {
	Hosts    []string      `yaml:"hosts"`
	Interval time.Duration `yaml:"interval,omitempty"`
	Network  string        `yaml:"network,omitempty"`
	Protocol string        `yaml:"protocol,omitempty"`
	Size     int           `yaml:"size,omitempty"`
	Source   string        `yaml:"source,omitempty"`
}

func (*TargetGroup) UnmarshalYAML

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

UnmarshalYAML implements the yaml.Unmarshaler interface.

Jump to

Keyboard shortcuts

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