server

package
v1.14.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigAdd

func ConfigAdd(path string)

func NewServer

func NewServer(handler http.Handler) *http.Server

NewServerWithOptions returns a pointer with new http Server

func NewServerWithConfigPath

func NewServerWithConfigPath(handler http.Handler, path string) (*http.Server, error)

NewServerWithConfigPath returns a pointer with new http Server

func NewServerWithOptions

func NewServerWithOptions(handler http.Handler, options *Options) *http.Server

NewServerWithOptions returns a pointer with new http Server

Types

type Options

type Options struct {
	Addr              string
	MaxHeaderBytes    int
	ReadHeaderTimeout time.Duration
	ReadTimeout       time.Duration
	WriteTimeout      time.Duration
	IdleTimeout       time.Duration
}

Options http server options.

func NewOptions

func NewOptions() (*Options, error)

NewOptions returns options from config file or environment vars.

func NewOptionsWithPath

func NewOptionsWithPath(path string) (opts *Options, err error)

NewOptionsWithPath unmarshals options based a given key path.

Jump to

Keyboard shortcuts

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