config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2018 License: Apache-2.0 Imports: 4 Imported by: 33

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultInterval defines default interval in case it is missing in yaml.
	DefaultInterval = 2 * time.Minute
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Instances []Instance `yaml:"instances"`
}

type Instance

type Instance struct {
	Instance     string        `yaml:"instance"`
	Region       string        `yaml:"region"`
	Interval     time.Duration `yaml:"interval"`
	AwsAccessKey string        `yaml:"aws_access_key"`
	AwsSecretKey string        `yaml:"aws_secret_key"`
}

type Settings

type Settings struct {
	sync.RWMutex
	// AfterLoad is run after every Load request but before releasing Mutex
	AfterLoad func(config Config) error
	// contains filtered or unexported fields
}

func (*Settings) Config

func (s *Settings) Config() Config

func (*Settings) Load

func (s *Settings) Load(filename string) error

Jump to

Keyboard shortcuts

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