Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertConfig ¶
type AlertConfig struct { Enabled bool `default:"false"` GitLab *GitlabConfig `envconfig:"gitlab"` }
type AuthorizationConfig ¶
AuthorizationConfig captures the config for auth using mlp authz
type Config ¶
type Config struct { Port int `envconfig:"turing_port" default:"8080"` AuthConfig *AuthorizationConfig `envconfig:"authorization" validate:"required"` DbConfig *DatabaseConfig `envconfig:"turing_database"` DeployConfig *DeploymentConfig `envconfig:"deployment"` RouterDefaults *RouterDefaults `envconfig:"turing_router"` Sentry sentry.Config `split_words:"false" envconfig:"SENTRY"` VaultConfig *VaultConfig `envconfig:"vault"` TuringEncryptionKey string `split_words:"true" required:"true"` AlertConfig *AlertConfig `envconfig:"alert"` MLPConfig *MLPConfig TuringUIConfig *TuringUIConfig `envconfig:"turing_ui"` // SwaggerFile specifies the file path containing OpenAPI spec. This file will be used to configure // OpenAPI validation middleware, which validates HTTP requests against the spec. SwaggerFile string `envconfig:"swagger_file" default:"swagger.yaml"` }
Config is used to parse and store the environment configs
func (*Config) ListenAddress ¶
ListenAddress returns the Turing Api app's port
type DatabaseConfig ¶
type DatabaseConfig struct { Host string `required:"true"` Port int `default:"5432"` User string `required:"true"` Password string `required:"true"` Database string `envconfig:"name" required:"true"` }
DatabaseConfig config captures the Turing database config
type DeploymentConfig ¶
type DeploymentConfig struct { EnvironmentType string `envconfig:"environment_type" required:"true"` GcpProject string `envconfig:"gcp_project" required:"true"` Timeout time.Duration `required:"true"` DeletionTimeout time.Duration `envconfig:"deletion_timeout" required:"true"` MaxCPU Quantity `envconfig:"max_cpu" required:"true"` MaxMemory Quantity `envconfig:"max_memory" required:"true"` }
DeploymentConfig captures the config related to the deployment of the turing routers
type FluentdConfig ¶
type FluentdConfig struct { // Image to use for fluentd deployments, in the format registry/repository:version. Image string `split_words:"true" required:"true"` // Fluentd tag for logs Tag string `split_words:"true" default:"turing-result.log"` // Flush interval seconds - value determined by load job frequency to BQ FlushIntervalSeconds int `split_words:"true" default:"90"` }
FluentdConfig captures the defaults used by the Turing Router when Fluentd is enabled
type GitlabConfig ¶
type MLPConfig ¶
type MLPConfig struct { MerlinURL string `envconfig:"merlin_url" required:"true"` MLPURL string `envconfig:"mlp_url" required:"true"` MLPEncryptionKey string `envconfig:"mlp_encryption_key" required:"true"` }
MLPConfig captures the configuration used to connect to the Merlin/MLP API servers
type RouterDefaults ¶
type RouterDefaults struct { // Turing router image, in the format registry/repository:version. Image string `required:"true"` // Enable Fiber debug logging FiberDebugLogEnabled bool `split_words:"true" default:"true"` // Enable router custom metrics CustomMetricsEnabled bool `split_words:"true" default:"true"` // Enable Jaeger Tracing JaegerEnabled bool `split_words:"true" default:"true"` // Jaeger collector endpoint. If JaegerEnabled is true, this value // must be set. JaegerCollectorEndpoint string `split_words:"true" required:"true"` // Router log level LogLevel string `split_words:"true" default:"INFO"` // Fluentd config for the router FluentdConfig *FluentdConfig `envconfig:"fluentd"` }
RouterDefaults contains default configuration for routers deployed by this isntance of the Turing API.
type TuringUIConfig ¶
type TuringUIConfig struct { // Optional. If configured, turing-api will serve static files of the turing-ui React app AppDirectory string `envconfig:"app_directory"` // Optional. Defines the relative path under which the app will be accessible. // This should match `homepage` value from the `package.json` file of the CRA app Homepage string `default:"/turing"` }
TuringUIConfig captures config related to serving Turing UI files
type VaultConfig ¶
VaultConfig captures the config for connecting to the Vault server