httpservice

package
v0.0.0-...-724bf7d Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	service.ListenerConfig
	service.TLSConfig
	//Http server disabled
	Disabled bool
	//BaseURL http scheme and host."http://127.0.0.1:8000" for example.
	BaseURL string
	//ReadTimeoutInSecond http conn read time out.
	ReadTimeoutInSecond int64
	//ReadTimeoutInSecond http conn read Header time out.
	ReadHeaderTimeoutInSecond int64
	//WriteTimeoutInSecond http conn write time out.
	WriteTimeoutInSecond int64
	//IdleTimeoutInSecond conn idle time out.
	IdleTimeoutInSecond int64
	//MaxHeaderBytes max header length in bytes.
	MaxHeaderBytes int
}

Config http server config.

func NewConfig

func NewConfig() *Config

NewConfig create new config.

func (*Config) Clone

func (c *Config) Clone() *Config

func (*Config) IsEmpty

func (c *Config) IsEmpty() bool

IsEmpty check if config is empty

func (*Config) Serve

func (c *Config) Serve(h http.Handler) (*http.Server, error)

func (*Config) Server

func (c *Config) Server() *http.Server

Server create http server with config.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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