http

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	*http.Server
	// contains filtered or unexported fields
}

Server extends net/http Server with graceful shutdowns.

func New

func New(config *config.Config, logger *zap.Logger, router *api.Router) *Server

New creates a new HTTP server instance.

func (Server) Close

func (s Server) Close() error

Close closes the HTTP Server instance

func (Server) Run

func (s Server) Run() error

Run starts HTTP server instance and listens of specified port.

func (Server) Wait

func (s Server) Wait() error

Wait waits for server to be stopped

Jump to

Keyboard shortcuts

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