config

package
v2.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const KubernetesMaxTimeoutSec = 2 * 60 * 60
View Source
const PiquantDownloadSignedURLExpirySec = 60 * 60

PiquantDownloadSignedURLExpirySec Expiry time in seconds of piquant executable signed S3 links

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	AdminEmails []string

	Auth0Domain             string
	Auth0ManagementClientID string
	Auth0ManagementSecret   string
	Auth0NewUserRoleID      string

	BuildsBucket string // Piquant download bucket
	ConfigBucket string

	CoresPerNode int32

	DataSourceSNSTopic string

	DatasetsBucket string

	EnvironmentName string

	HotQuantNamespace string // Used for faster PIQUANT runs, eg executing a spectral fit

	KubernetesLocation string // "internal" vs "external"

	LogLevel           logger.LogLevel // Can be changed at runtime, but if API restarts, it goes back to configured value
	ManualUploadBucket string

	// Mongo Connection
	MongoSecret string

	PiquantDockerImage string // PIQUANT docker image to use to run a job
	PiquantJobsBucket  string // PIQUANT job scratch drive

	PosterImage             string
	QuantDestinationPackage string

	QuantExecutor  string
	QuantNamespace string // Used for running large multi-node quants

	QuantObjectType string

	SentryEndpoint string

	UsersBucket string

	// Vars not set by environment
	NodeCountOverride int32
	MaxQuantNodes     int32
	KubeConfig        string // Env sets this via command line parameter
}

APIConfig combines env vars and config JSON values

func Init

func Init() (APIConfig, error)

Init config, loads config params

func NewConfigFromFile added in v2.0.8

func NewConfigFromFile(configFilePath string) (APIConfig, error)

func NewConfigFromJsonString added in v2.0.8

func NewConfigFromJsonString(customConfigStr string) (APIConfig, error)

Jump to

Keyboard shortcuts

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