config

package
v0.0.0-...-40a75d2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvDeploy                                = "deploy"
	EnvKubernetesNamespace                   = "kubernetes_Namespace"
	EnvKubernetesCreateNamespaceIfNotPresent = "kubernetes_CreateNamespaceIfNotPresent"
	EnvDatabaseURI                           = "database_uri"
	EnvDatabaseSalt                          = "database_salt"
	EnvSecretKey                             = "secretkey"
	EnvQuotaInstance                         = "quota_instance"
	EnvQuotaCpu                              = "quota_cpu"
	EnvQuotaMemory                           = "quota_memory"
	EnvQuotaNvidiaGpu                        = "quota_nvidia_gpu"
	EnvQuotaStorage                          = "quota_storage"
	EnvDomainUpper                           = "domain_upper"
	EnvDomainPrefix                          = "domain_prefix"
)

Names of environment variables to read

View Source
const (
	EnvDeployDebug = "debug"
	EnvDeployStage = "stage"
	EnvDeployProd  = "prod"
)

Possible parameters

Variables

This section is empty.

Functions

This section is empty.

Types

type Configs

type Configs struct {
	Deploy    string // One of debug, stage or prod
	SecretKey string // used for JWT signing

	Kubernetes struct {
		Namespace                   string
		CreateNamespaceIfNotPresent bool
	}
	Database struct {
		URI  string
		Salt string
	}
	Quota struct {
		Instance  int
		Cpu       int
		Memory    int
		NvidiaGpu int
		Storage   int
	}
	Domain struct {
		Upper  string // csuos.ml
		Prefix string // if prefix is "jupy", ingress will be generated likes jupy-servername.csuos.ml
	}
}

Configs saves configuration needed

func GetConfigs

func GetConfigs() *Configs

GetConfigs read environment variables and return configuration.

Jump to

Keyboard shortcuts

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