mirror of
https://github.com/kubeshark/kubeshark.git
synced 2026-07-11 01:19:26 +00:00
22 lines
453 B
Go
22 lines
453 B
Go
package configs
|
|
|
|
import (
|
|
"os"
|
|
"strconv"
|
|
"time"
|
|
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
// FiberConfig func for configuration Fiber app.
|
|
// See: https://docs.gofiber.io/api/fiber#config
|
|
func FiberConfig() fiber.Config {
|
|
// Define server settings.
|
|
readTimeoutSecondsCount, _ := strconv.Atoi(os.Getenv("SERVER_READ_TIMEOUT"))
|
|
|
|
// Return Fiber configuration.
|
|
return fiber.Config{
|
|
ReadTimeout: time.Second * time.Duration(readTimeoutSecondsCount),
|
|
}
|
|
}
|