Exemple #1
0
	// to register with Kontrol and to install klient.
	//
	// Environment is overwritten during deploy via linker flag.
	Environment = "development"

	// KiteVersion is the version identifier used to connect to Kontrol.
	KiteVersion = "0.0." + Version

	// Used to send basic error metrics.
	//
	// Injected on build.
	SegmentKey = ""
)

var Konfig = configstore.Read(&config.Environments{
	Env:       Environment,
	KlientEnv: kd2klient(Environment),
})

func dirURL(s, env string) string {
	u, err := url.Parse(s)
	if err != nil {
		panic(err)
	}

	if env == "" {
		u.Path = path.Dir(u.Path)
	} else {
		u.Path = env
	}

	return u.String()
Exemple #2
0
// ReadKonfig reads klient configuration.
func ReadKonfig() *konfig.Konfig {
	return configstore.Read(envs)
}