config

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package config loads configuration.

Index

Constants

View Source
const Version = "1.2.5"

Version is program version.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SecretRoleArn         string
	Targets               string
	Interval              time.Duration
	Timeout               time.Duration
	MetricsAddr           string
	MetricsPath           string
	MetricsNamespace      string
	MetricsLatencyBuckets []float64
	HealthAddr            string
	HealthPath            string
	Debug                 bool
}

Config holds program configuration.

func GetConfig

func GetConfig() Config

GetConfig loads configuration.

type Target

type Target struct {
	Name      string `yaml:"name"`
	URI       string `yaml:"uri"`
	Cmd       string `yaml:"cmd"`
	Database  string `yaml:"database"` // command hello requires database
	User      string `yaml:"user"`
	Pass      string `yaml:"pass"`
	TLSCaFile string `yaml:"tls_ca_file"`
	RoleArn   string `yaml:"role_arn"`
}

Target holds ping target.

func LoadTargets

func LoadTargets(targetsFile, sessionName, secretRoleArn string) []Target

LoadTargets load targets from file.

Jump to

Keyboard shortcuts

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