server

package
v0.0.0-...-d9c38a9 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPServer

type HTTPServer struct {
	Config config.ServerConfig
	Serv   *http.Server
}

HTTPServer in an implementation of Server interface

func New

func New(configuration config.ServerConfig) *HTTPServer

New constructs new implementation of Server interface

func (*HTTPServer) Initialize

func (server *HTTPServer) Initialize(address string) http.Handler

Initialize perform the server initialization

func (*HTTPServer) LogRequest

func (server *HTTPServer) LogRequest(nextHandler http.Handler) http.Handler

LogRequest - middleware for loging requests

func (*HTTPServer) Start

func (server *HTTPServer) Start() error

Start starts server

func (*HTTPServer) Stop

func (server *HTTPServer) Stop(ctx context.Context) error

Stop stops server's execution

Jump to

Keyboard shortcuts

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