Skip to content

Commit

Permalink
chore: ununsed code
Browse files Browse the repository at this point in the history
  • Loading branch information
achettyiitr committed Feb 20, 2024
1 parent ba93342 commit ed1b3a7
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,36 +79,18 @@ type Runner struct {
enableSuppressUserFeature bool
logger logger.Logger
appHandler apphandlers.AppHandler
readTimeout time.Duration
readHeaderTimeout time.Duration
writeTimeout time.Duration
idleTimeout time.Duration
gracefulShutdownTimeout time.Duration
maxHeaderBytes int
}

// New creates and initializes a new Runner
func New(releaseInfo ReleaseInfo) *Runner {
getConfigDuration := func(defaultValueInTimescaleUnits int64, timeScale time.Duration, keys ...string) time.Duration {
for i, key := range keys {
if config.IsSet(key) || i == len(keys)-1 {
return config.GetDuration(key, defaultValueInTimescaleUnits, timeScale)
}
}
return 0
}
return &Runner{
appType: strings.ToUpper(config.GetString("APP_TYPE", app.EMBEDDED)),
releaseInfo: releaseInfo,
logger: logger.NewLogger().Child("runner"),
warehouseMode: config.GetString("Warehouse.mode", "embedded"),
enableSuppressUserFeature: config.GetBool("Gateway.enableSuppressUserFeature", true),
readTimeout: getConfigDuration(0, time.Second, "ReadTimeOut", "ReadTimeOutInSec"),
readHeaderTimeout: getConfigDuration(0, time.Second, "ReadHeaderTimeout", "ReadHeaderTimeoutInSec"),
writeTimeout: getConfigDuration(10, time.Second, "WriteTimeout", "WriteTimeOutInSec"),
idleTimeout: getConfigDuration(720, time.Second, "IdleTimeout", "IdleTimeoutInSec"),
gracefulShutdownTimeout: config.GetDuration("GracefulShutdownTimeout", 15, time.Second),
maxHeaderBytes: config.GetInt("MaxHeaderBytes", 524288),
}
}

Expand Down

0 comments on commit ed1b3a7

Please sign in to comment.