httpserver

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

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

Config of connector.

type Connector

type Connector struct {
	daemon.WatcherConfigFunc
	daemon.ShutdownFunc
	// contains filtered or unexported fields
}

Connector is a wrapped http server.

func New

func New(prefix string, opts ...Option) *Connector

New get a instance of http server.

type Middleware added in v0.0.3

type Middleware func(http.Handler) http.Handler

Middleware is signature of all http server-side middleware.

type Option

type Option func(*Connector)

func WithHandler

func WithHandler(o http.Handler) Option

func WithLogger

func WithLogger(l logging.Logger) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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