Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ServiceName OpenTelemetry service name ServiceName = "neuron" // DefaultRunnerPort runner default port DefaultRunnerPort = 9876 // DefaultYamlFileName default tas yaml file name. DefaultYamlFileName = ".tas.yml" // DefaultNamespace default k8 namespace. DefaultNamespace = "phoenix" // DefaultContainerVolumePath default container mount path. DefaultContainerVolumePath = "/workspace-cache" // DefaultVaultVolumePath default vault secrets mount path. DefaultVaultVolumePath = "/vault/secrets" // DefaultVolumeName default pv volume name. DefaultVolumeName = "nucleus-pv-storage" // DefaultSecResourceName default secrets name. DefaultSecResourceName = "nucleus-secrets" // DefaultUserRepoSecVolumeName secret volume name for user's secrets. DefaultUserRepoSecVolumeName = "user-repo-secret-volume" // DefaultUserTokVolumeName token volume name for user's oauth token. DefaultUserTokVolumeName = "user-token-volume" // DefaultPodTimeout default is nucleus pod timeout. DefaultPodTimeout = 3 * time.Hour // BuildTimeout default build timeout. BuildTimeout = 12 * time.Hour // MysqlMaxIdleConnection max mysql idle connections. MysqlMaxIdleConnection = 25 // MysqlMaxOpenConnection max mysql open connections. MysqlMaxOpenConnection = 25 // MysqlMaxConnectionLifetime max mysql connection lifetime. MysqlMaxConnectionLifetime = 5 * time.Minute // DefaultVaultNamespace the default vault namespace. DefaultVaultNamespace = "admin" // DefaultCredits default user credits. DefaultCredits = 100 // DefaultMetricsFileName default test metrics file name. DefaultMetricsFileName = "metrics.csv" // DefaultFailureDetailsFileName is default file name containing failed tests details DefaultFailureDetailsFileName = "failure.json" // GraphVisualizationDayCount defines number of days of data returned by repository graph API. GraphVisualizationDayCount = 29 // MonthInterval is used to populate graph data of last month's MonthInterval = 31 // Base10 is used in parsing ints from string Base10 = 10 // BitSize16 represent bitSize 16 of integers in which the result of parsing strings must fit into BitSize16 = 16 // BitSize32 represent bitSize 32 of integers in which the result of parsing strings must fit into BitSize32 = 32 // BitSize64 represent bitSize 64 of integers in which the result of parsing strings must fit into BitSize64 = 64 // TestLocatorsDelimiter is used to separate test locators for a task. TestLocatorsDelimiter = "#TAS#" // LocatorDelimiter is used to separate each component of a locator. LocatorDelimiter = "##" // DefaultShutDownDelay is the delay for graceful shutdown of all queue consumers DefaultShutDownDelay = 15e9 // 15 seconds, value is int64 nanoseconds due to issue in viper. // DefaultRunnerWaitTimeout is the default timeout for runner to exit gracefully DefaultRunnerWaitTimeout = 4 * 36e11 // 4 hours // DefaultGracefulTimeout is default timeout for graceful shutdown of the app. DefaultGracefulTimeout = 5 * 6e10 // 5 minutes // GithubAppBaseURL API Base URL endpoint GithubAppBaseURL = "https://api.github.com/app" )
View Source
const ( Dev = "dev" Prod = "prod" Stage = "stage" Pi = "pi" )
All possible env values
View Source
const ( L1 = "1-3 Years" L2 = "4-6 Years" L3 = "7-10 Years" L4 = "More than 10 Years" Small = "Less than 10 members" Medium = "10-100 members" Large = "100-500 members" Xlarge = "More than 500 members" )
These values are used in storing user information as a key in database
View Source
const ( // RepoURLSplitSize is size of slice when repo url is split with slash as delimiter RepoURLSplitSize = 3 // DefaultLayout is the default layout to parse time strings DefaultLayout = "2006-01-02 15:04:05 +0000 UTC" // FloatPrecision value is used in parsing string to float FloatPrecision = 64 // BlobMetricsLength is default number of columns in metrics csv BlobMetricsLength = 4 // OOMKilledExitCode is exit code for OOMKilled error. OOMKilledExitCode = 137 // GithubAppJWTExpiryDuration github app jwt expiry duration GithubAppJWTExpiryDuration = 10 * time.Minute // ExpiryDelta butffer time for token expiry ExpiryDelta = 15 * time.Minute )
View Source
const BinaryVersion = "0.0.1"
BinaryVersion is the semver version of neuron.
View Source
const (
// DefaultAvatarImageURL default avatar image url for an org.
DefaultAvatarImageURL = "https://avatars.githubusercontent.com/u/77802575"
)
View Source
const (
MIMECSV = "text/csv"
)
MIMECSV type not present in gin
Variables ¶
View Source
var CorsAllowedOrigins = []string{"https://dev.lambdatest.io:3000",
"https://dev.lambdatestinternal.com:3000",
"https://stage-tas.lambdatestinternal.com",
"https://tas.lambdatest.com",
"https://tas-pi.lambdatest.com"}
CorsAllowedOrigins list of allowed origins
View Source
var GitStatusLabel, CookieName, CookieDomain, StorageClassName,
NucleusPodMinCPULimit, NucleusPodMinMemoryLimit map[string]string
View Source
var NucleusDockerImage map[core.Runner]map[string]string
NucleusDockerImage default nucleus image
View Source
var NucleusImagePolicy map[string]v1.PullPolicy
NucleusImagePolicy k8 image pull policy
View Source
var UserExperience map[string]string
UserExperience maps experience info to db entity
View Source
var UserTeamSize map[string]string
UserTeamSize maps team size info to db entity
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.