httpfx

package
v0.0.0-...-c671cac Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpServerProvider

func HttpServerProvider(config *HttpServerConfig, logger *log.Logger) *http.Server

Types

type HttpServerConfig

type HttpServerConfig struct {
	Addr         string        `mapstructure:"addr"`
	ReadTimeout  time.Duration `mapstructure:"read_timeout"`
	WriteTimeout time.Duration `mapstructure:"write_timeout"`
}

type HttpServerConfigProviderFunc

type HttpServerConfigProviderFunc func(*viper.Viper) (*HttpServerConfig, error)

func MakeHttpServerConfigProvider

func MakeHttpServerConfigProvider(rootKey string, opts ...Option) HttpServerConfigProviderFunc

type Option

type Option func(*HttpServerConfig)

func WithDefault

func WithDefault(defaultConfig *HttpServerConfig) Option

func WithDefaultAddr

func WithDefaultAddr(addr string) Option

Jump to

Keyboard shortcuts

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