configuration

package
v0.0.0-...-e2b69e1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

package configuration defines different sources of text-based configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseSource

func ParseSource(text string) (kind string, path string)

ParseSource parses text and returns the kind of configuration source and the desired path.

Types

type Source

type Source func(context.Context) (data []byte, err error)

Source is a source for configuration. Calling it will block until a new version of the config is available.

func Etcd

func Etcd(path string, endpoints []string) Source

Etcd is a configuration stored in etcd. It will be reloaded as soon as it changes.

func LocalFile

func LocalFile(path string) Source

LocalFiles is a configuration stored in a file in the local filesystem. The file will be reloaded if the process receives a SIGHUP.

Jump to

Keyboard shortcuts

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