fasthttpconfig

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configurator

type Configurator interface {
	GetHttpServerName() string
	GetHttpServerPort() string
	GetHttpServerShutDownTimeout() time.Duration
	GetHttpServerRequestTimeout() time.Duration
}

type Server

type Server struct {
	// ServerName is a name of the shared server.
	ServerName string `envconfig:"FASTHTTP_SERVER_NAME" mapstructure:"FASTHTTP_SERVER_NAME" default:"@BorislavGlazunov"`
	// ServerPort is a port for shared server (endpoints like a /probe for k8s).
	ServerPort string `envconfig:"FASTHTTP_SERVER_PORT" mapstructure:"FASTHTTP_SERVER_PORT" default:":8020"`
	// ServerShutDownTimeout is a duration value before the server will be closed forcefully.
	ServerShutDownTimeout time.Duration `envconfig:"FASTHTTP_SERVER_SHUTDOWN_TIMEOUT" mapstructure:"FASTHTTP_SERVER_SHUTDOWN_TIMEOUT" default:"5s"`
	// ServerRequestTimeout is a timeout value for close request forcefully.
	ServerRequestTimeout time.Duration `envconfig:"FASTHTTP_SERVER_REQUEST_TIMEOUT" mapstructure:"FASTHTTP_SERVER_REQUEST_TIMEOUT" default:"1m"`
}

func (Server) GetHttpServerName

func (c Server) GetHttpServerName() string

func (Server) GetHttpServerPort

func (c Server) GetHttpServerPort() string

func (Server) GetHttpServerRequestTimeout

func (c Server) GetHttpServerRequestTimeout() time.Duration

func (Server) GetHttpServerShutDownTimeout

func (c Server) GetHttpServerShutDownTimeout() time.Duration

Jump to

Keyboard shortcuts

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