config

package
v0.0.0-...-7ece020 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2016 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsulHelper

type ConsulHelper struct {
	ConsulAddress string
	ConsulScheme  string
}

ConsulHelper makes working with Consul distributed service discovery easier by providing function to read keys/values and convert them to int, string and etc.

func (ConsulHelper) GetInt

func (consulHelper ConsulHelper) GetInt(keyPath string) (int, error)

GetInt converts the value identified by the given key path to an integer and returns it.

func (ConsulHelper) GetKeyPair

func (consulHelper ConsulHelper) GetKeyPair(keyPath string) (*api.KVPair, error)

GetKeyPair returns key pair value.

func (ConsulHelper) GetString

func (consulHelper ConsulHelper) GetString(keyPath string) (string, error)

GetString converts the value identified by the given key path to an string and returns it.

Jump to

Keyboard shortcuts

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