server

package
v0.0.0-...-8588dec Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: MIT Imports: 15 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
}

Server wraps the http.Server type for extending functionality.

func New

func New(ctx context.Context, config map[string]string, cache cache.Cache) *Server

The New function creates a new http.Server type, configures the routes, adds middleware, and starts the server gracefully.

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start starts the HTTP server in a separate goroutine and listens for the context cancellation signal to shut down the server gracefully.

Jump to

Keyboard shortcuts

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