config

package
v0.0.0-...-8de869a Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigKV

func GetConfigKV() map[string]string

func GetConsulClient

func GetConsulClient(settings Settings) (*consulApi.Client, error)

func GetConsulKV

func GetConsulKV(client *consulApi.Client, settings Settings, key string) (*consulApi.KVPair, error)

func GetConsulKeys

func GetConsulKeys(client *consulApi.Client, settings Settings) ([]string, error)

func GetConsulNodes

func GetConsulNodes(client *consulApi.Client) (map[string]string, error)

Types

type Config

type Config struct {
	Keys   map[string]string
	Logger *logger.Log
}

func GetConfig

func GetConfig(settings Settings) *Config

func Start

func Start(settings Settings, keys []string) *Config

func (Config) Dumps

func (c Config) Dumps(settings Settings)

type Settings

type Settings struct {
	ConsulUrl          string
	Prefix             string
	AppName            string
	AutoRefresh        bool
	AutoRefreshSeconds time.Duration
}

Jump to

Keyboard shortcuts

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