envs

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetValidationCredentials

func GetValidationCredentials() (string, string)

func WatchConfigFiles

func WatchConfigFiles(
	wg *sync.WaitGroup,
	envsFileName, envCredentialsFileName, validationCredentialsFileName string,
	configRefreshPeriod int,
	configFilesHashValues map[string]string,
	environments *Environments,
	subscribedFeeds map[string][]feeds.Feed,
	appConfig *config.AppConfig,
	log *logger.UPPLogger,
)

Types

type Credentials

type Credentials struct {
	EnvName  string `json:"env-name"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type Environment

type Environment struct {
	Name     string `json:"name"`
	ReadURL  string `json:"read-url"`
	Username string `json:"username"`
	Password string `json:"password"`
}

Environment defines an environment in which the publish metrics should be checked

type Environments

type Environments struct {
	// contains filtered or unexported fields
}

Environments provides a thread-safe collection of Environment structs

func NewEnvironments

func NewEnvironments() *Environments

func (*Environments) AreReady

func (e *Environments) AreReady() bool

func (*Environments) Environment

func (e *Environments) Environment(name string) Environment

func (*Environments) Len

func (e *Environments) Len() int

func (*Environments) Names

func (e *Environments) Names() []string

func (*Environments) RemoveEnvironment

func (e *Environments) RemoveEnvironment(name string)

func (*Environments) SetEnvironment

func (e *Environments) SetEnvironment(name string, env Environment)

func (*Environments) SetReady

func (e *Environments) SetReady(val bool)

func (*Environments) Values

func (e *Environments) Values() []Environment

Jump to

Keyboard shortcuts

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