http

package
v0.26.0-rc2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package http implements an HTTP server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

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

A Server defines configuration for running an HTTP server.

func NewServer

func NewServer(port uint16) *Server

NewServer returns http server with port.

func NewServerWithListener added in v0.7.0

func NewServerWithListener(listener net.Listener) *Server

NewServerWithListener returns http server with listener.

func (*Server) Addr

func (s *Server) Addr() string

Addr returns the server address.

func (*Server) BuildServer added in v0.2.0

func (s *Server) BuildServer(tlsConfig *tls.Config) error

BuildServer init http server.

func (*Server) Close

func (s *Server) Close() error

Close closes the server.

func (*Server) IsPresent added in v0.27.0

func (s *Server) IsPresent() bool

func (*Server) RegistryDesc

func (s *Server) RegistryDesc(services ...transport.Service)

RegistryDesc in http server.

func (*Server) Router

func (s *Server) Router() chi.Router

Router returns http router.

func (*Server) Serve

func (s *Server) Serve() error

Serve starts serving incoming connections.

func (*Server) UseMiddleware added in v0.7.0

func (s *Server) UseMiddleware(middlewares ...func(http.Handler) http.Handler)

UseMiddleware appends a middleware handler to the Mux middleware stack.

Jump to

Keyboard shortcuts

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