cli

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConfigNotFound = errors.New(heredoc.Doc(`
	Config file not found. Loading from defaults...

	Run "compass config init" to initialize a new configuartion file 
	Run "compass help environment" for more information.

	Alternatively, make a "compass.yaml" file in the current directory from the example given
`))
)
View Source
var (
	Version string
)

Version of the current build. overridden by the build system. see "Makefile" for more information

Functions

func LoadConfigFromFlag

func LoadConfigFromFlag(cfgFile string, cfg *Config) error

func LoadFromCurrentDir

func LoadFromCurrentDir(cfg *Config) error

func New

func New(cliConfig *Config) *cobra.Command

Types

type Config

type Config struct {
	// Log
	LogLevel string `yaml:"log_level" mapstructure:"log_level" default:"info"`

	// StatsD
	StatsD statsd.Config `mapstructure:"statsd"`

	// NewRelic
	NewRelic metrics.NewRelicConfig `mapstructure:"newrelic"`

	// Elasticsearch
	Elasticsearch esStore.Config `mapstructure:"elasticsearch"`

	// Database
	DB postgres.Config `mapstructure:"db"`

	// Service
	Service server.Config `mapstructure:"service"`

	// Client
	Client client.Config `mapstructure:"client"`
}

func LoadConfig

func LoadConfig() (*Config, error)

Jump to

Keyboard shortcuts

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