cmd

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Run: func(cmd *cobra.Command, args []string) {
		viper.SetEnvPrefix("ecssd")
		viper.SetDefault("interval", 10)
		viper.SetDefault("region", "us-east-1")
		viper.SetDefault("path", "prometheus-ecs-sd.json")
		viper.SetDefault("debug", false)
		viper.AutomaticEnv()
		if viper.GetBool("debug") {
			log.SetLevel(log.DebugLevel)
		}
		ctx := context.Background()
		discovery.NewECSDiscovery(discovery.Config{
			Interval: time.Duration(viper.GetInt("interval")) * time.Second,
			Region:   viper.GetString("region"),
			Path:     viper.GetString("path"),
		}).Run(ctx)
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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