server

package
v0.0.0-...-3773cab Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(conf Config, router http.Handler)

Types

type Config

type Config struct {
	Address      string        `envconfig:"HTTP_ADDRESS" default:""`
	Port         int           `envconfig:"HTTP_PORT" default:"3000"`
	ReadTimeout  time.Duration `envconfig:"HTTP_READ_TIMEOUT" default:"10s"`
	WriteTimeout time.Duration `envconfig:"HTTP_WRITE_TIMEOUT" default:"10s"`
}

func LoadConfig

func LoadConfig() (Config, error)

Jump to

Keyboard shortcuts

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