config

package
v0.0.0-...-764c78a Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	KafkaGroupId  = "sources-api-go"
	RdsCaLocation = "/app/rdsca.cert"

	DatabaseStore       = "database"
	VaultStore          = "vault"
	SecretsManagerStore = "secrets-manager"
)

Variables

This section is empty.

Functions

func IsVaultOn

func IsVaultOn() bool

IsVaultOn returns true if the authentications are backed by Vault. False, if they are backed by the database. DEPRECATED: should be using methods on the authentication object instead of checking the config directly.

Types

type SourcesApiConfig

type SourcesApiConfig struct {
	AppName                 string
	Hostname                string
	KafkaBrokerConfig       []clowder.BrokerConfig
	KafkaTopics             map[string]string
	KafkaGroupID            string
	MetricsPort             int
	LogLevel                string
	LogGroup                string
	MarketplaceHost         string
	AwsRegion               string
	AwsAccessKeyID          string
	AwsSecretAccessKey      string
	DatabaseHost            string
	DatabasePort            int
	DatabaseUser            string
	DatabasePassword        string
	DatabaseName            string
	DatabaseSSLMode         string
	DatabaseCert            string
	FeatureFlagsEnvironment string
	FeatureFlagsUrl         string
	FeatureFlagsAPIToken    string
	FeatureFlagsService     string
	CacheHost               string
	CachePort               int
	CachePassword           string
	SlowSQLThreshold        int
	Psks                    []string
	BypassRbac              bool
	StatusListener          bool
	BackgroundWorker        bool
	MigrationsSetup         bool
	MigrationsReset         bool
	SecretStore             string
	TenantTranslatorUrl     string
	Env                     string
	HandleTenantRefresh     bool

	SecretsManagerAccessKey string
	SecretsManagerSecretKey string
	SecretsManagerPrefix    string
	LocalStackURL           string
}

SourcesApiConfig is the struct for storing runtime configuration

func Get

func Get() *SourcesApiConfig

Get - returns the config parsed from runtime vars

func (*SourcesApiConfig) KafkaTopic

func (sourceConfig *SourcesApiConfig) KafkaTopic(requestedTopic string) string

func (SourcesApiConfig) String

func (s SourcesApiConfig) String() string

String() returns a string that shows the settings in which the pod is running in

Jump to

Keyboard shortcuts

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