httpserver

package
v1.3.13 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2020 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogTag = log.String("adapter", "http-HttpServer")

Functions

func NewServerConfig added in v0.7.11

func NewServerConfig(httpAddress string, profiling bool) config.HttpServerConfig

Types

type HttpServer

type HttpServer struct {
	supervised.ChanShutdownWaiter
	// contains filtered or unexported fields
}

func NewHttpServer

func NewHttpServer(cfg config.HttpServerConfig, logger log.Logger, metricRegistry metric.Registry) *HttpServer

func (*HttpServer) GracefulShutdown

func (s *HttpServer) GracefulShutdown(shutdownContext context.Context)

func (*HttpServer) Index added in v1.2.1

func (s *HttpServer) Index(w http.ResponseWriter, r *http.Request)

Serves both index and 404 because router is built that way

func (*HttpServer) Port

func (s *HttpServer) Port() int

func (*HttpServer) RegisterPublicApi added in v1.3.0

func (s *HttpServer) RegisterPublicApi(publicApi services.PublicApi)

func (*HttpServer) Router added in v1.1.0

func (s *HttpServer) Router() *http.ServeMux

type IndexResponse added in v1.1.0

type IndexResponse struct {
	Status      string
	Description string
	Version     config.Version
}

type ServerConfig added in v0.7.11

type ServerConfig struct {
	// contains filtered or unexported fields
}

func (*ServerConfig) HttpAddress added in v0.7.11

func (c *ServerConfig) HttpAddress() string

func (*ServerConfig) Profiling added in v0.7.11

func (c *ServerConfig) Profiling() bool

type TcpKeepAliveListener added in v1.1.0

type TcpKeepAliveListener struct {
	*net.TCPListener
}

func (TcpKeepAliveListener) Accept added in v1.1.0

func (ln TcpKeepAliveListener) Accept() (net.Conn, error)

Jump to

Keyboard shortcuts

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