server

package
v0.0.0-...-0631483 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2022 License: MIT Imports: 6 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 {
	Server *http.Server
	// contains filtered or unexported fields
}

Server wraps http.Server

func NewServer

func NewServer(server *http.Server, sugarLogger *zap.SugaredLogger, gracefulShutdownTimeout int64) *Server

NewServer creates Server

func (*Server) Run

func (s *Server) Run(ctx context.Context, closers ...func())

Run runs server and wait os.Interrupt signal to gracefully shutdown server and close all resources with closers

Jump to

Keyboard shortcuts

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