env

package
v1.5.3 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package env created on 2017/6/22.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEnvConfigurationSource

func NewEnvConfigurationSource() source.ConfigSource

NewEnvConfigurationSource configures a new environment configuration

Types

type Source

type Source struct {
	Configs sync.Map
	// contains filtered or unexported fields
}

Source is a struct

func (*Source) AddDimensionInfo

func (es *Source) AddDimensionInfo(labels map[string]string) error

AddDimensionInfo no use

func (*Source) Cleanup

func (es *Source) Cleanup() error

Cleanup cleans a particular environment configuration up

func (*Source) Delete

func (es *Source) Delete(key string) error

Delete no use

func (*Source) GetConfigurationByKey

func (es *Source) GetConfigurationByKey(key string) (interface{}, error)

GetConfigurationByKey gets required configuration for a particular key

func (*Source) GetConfigurations

func (es *Source) GetConfigurations() (map[string]interface{}, error)

GetConfigurations gets all configuration

func (*Source) GetPriority

func (es *Source) GetPriority() int

GetPriority returns priority of environment configuration

func (*Source) GetSourceName

func (*Source) GetSourceName() string

GetSourceName returns the name of environment source

func (*Source) Set

func (es *Source) Set(key string, value interface{}) error

Set no use

func (*Source) SetPriority

func (es *Source) SetPriority(priority int)

SetPriority custom priority

func (*Source) Watch

func (*Source) Watch(callback source.EventHandler) error

Watch dynamically handles a environment configuration

Jump to

Keyboard shortcuts

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