config

package
v1.38.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	ConsumerQueue              string        `envconfig:"CONSUMER_QUEUE"`
	ConsumerQueueURL           string        `envconfig:"CONSUMER_QUEUE_URL"`
	ProducerQueue              string        `envconfig:"PRODUCER_QUEUE"`
	VerificationKey            string        `envconfig:"VERIFICATION_KEY" json:"-"`
	DeploymentRoot             string        `envconfig:"DEPLOYMENT_ROOT"`
	NomadEndpoint              string        `envconfig:"NOMAD_ENDPOINT"`
	NomadToken                 string        `envconfig:"NOMAD_TOKEN" json:"-"`
	NomadCACert                string        `envconfig:"NOMAD_CA_CERT" json:"-"`
	NomadTLSSkipVerify         bool          `envconfig:"NOMAD_TLS_SKIP_VERIFY"`
	DeploymentTimeout          time.Duration `envconfig:"DEPLOYMENT_TIMEOUT"`
	BindAddr                   string        `envconfig:"BIND_ADDR"`
	HealthcheckInterval        time.Duration `envconfig:"HEALTHCHECK_INTERVAL"`
	HealthcheckCriticalTimeout time.Duration `envconfig:"HEALTHCHECK_CRITICAL_TIMEOUT"`
	PrivateKey                 string        `envconfig:"PRIVATE_KEY" json:"-"`
	VaultAddr                  string        `envconfig:"VAULT_ADDR"`
	VaultToken                 string        `envconfig:"VAULT_TOKEN" json:"-"`
	AWSRegion                  string        `envconfig:"AWS_REGION"`
	SecretsBucketName          string        `envconfig:"SECRETS_BUCKET_NAME"`
	DeploymentsBucketName      string        `envconfig:"DEPLOYMENTS_BUCKET_NAME"`
	GracefulShutdownTimeout    time.Duration `envconfig:"GRACEFUL_SHUTDOWN_TIMEOUT"`
	ECR_URL                    string        `envconfig:"ECR_URL"`
	ArtifactSource             string        `envconfig:"ARTIFACT_SOURCE"`
	ConsumerQueueNew           string        `envconfig:"CONSUMER_QUEUE_NEW"`
	ConsumerQueueURLNew        string        `envconfig:"CONSUMER_QUEUE_URL_NEW"`
}

Configuration structure whiich holds information for configuring the deployer

func Get

func Get() (*Configuration, error)

Get the application and returns the configuration structure

func (Configuration) String

func (config Configuration) String() string

String is implemented to prevent senstve fields being logged. The config is returned as JSON with sensitive fields omitted.

Jump to

Keyboard shortcuts

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