Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed Oct 23, 2023
1 parent 00f2d86 commit 629849b
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions cmd/kas/kasapp/defaulting.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ import (
)

const (
defaultGitLabApiRateLimitRefillRate = 50.0
defaultGitLabApiRateLimitBucketSize = 250

defaultListenGracePeriod = 5 * time.Second

defaultAgentInfoCacheTTL = 5 * time.Minute
Expand All @@ -29,11 +26,6 @@ const (
defaultAgentListenConnectionsPerTokenPerMinute = 40000
defaultAgentListenMaxConnectionAge = 2 * time.Hour

defaultGitalyGlobalApiRefillRate = 30.0
defaultGitalyGlobalApiBucketSize = 70
defaultGitalyPerServerApiRate = 15.0
defaultGitalyPerServerApiBucketSize = 40

defaultRedisDialTimeout = 5 * time.Second
defaultRedisWriteTimeout = 3 * time.Second
defaultRedisKeyPrefix = "gitlab-kas"
Expand Down Expand Up @@ -92,12 +84,6 @@ func defaultPrivateApi(api *kascfg.PrivateApiCF) {
prototool.Duration(&api.Listen.ListenGracePeriod, defaultListenGracePeriod)
}

func defaultGitLab(g *kascfg.GitLabCF) {
prototool.NotNil(&g.ApiRateLimit)
prototool.Float64(&g.ApiRateLimit.RefillRatePerSecond, defaultGitLabApiRateLimitRefillRate)
prototool.Uint32(&g.ApiRateLimit.BucketSize, defaultGitLabApiRateLimitBucketSize)
}

func defaultAgent(a *kascfg.AgentCF) {
prototool.NotNil(&a.Listen)
prototool.StringPtr(&a.Listen.Network, defaultAgentListenNetwork)
Expand All @@ -113,16 +99,6 @@ func defaultAgent(a *kascfg.AgentCF) {
prototool.Duration(&a.RedisConnInfoGc, defaultAgentRedisConnInfoGC)
}

func defaultGitaly(g *kascfg.GitalyCF) {
prototool.NotNil(&g.GlobalApiRateLimit)
prototool.Float64(&g.GlobalApiRateLimit.RefillRatePerSecond, defaultGitalyGlobalApiRefillRate)
prototool.Uint32(&g.GlobalApiRateLimit.BucketSize, defaultGitalyGlobalApiBucketSize)

prototool.NotNil(&g.PerServerApiRateLimit)
prototool.Float64(&g.PerServerApiRateLimit.RefillRatePerSecond, defaultGitalyPerServerApiRate)
prototool.Uint32(&g.PerServerApiRateLimit.BucketSize, defaultGitalyPerServerApiBucketSize)
}

func defaultRedis(r *kascfg.RedisCF) {
prototool.Duration(&r.DialTimeout, defaultRedisDialTimeout)
prototool.Duration(&r.WriteTimeout, defaultRedisWriteTimeout)
Expand Down

0 comments on commit 629849b

Please sign in to comment.