http_server

package
v0.0.0-...-317f090 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 8 Imported by: 7

README

http server

This package provides a default preconfigured http server.

Handle Timeouts in Golang

request-lifecycle-timeouts.png

Docs

Documentation

Index

Constants

View Source
const TimeoutMessage = `{"error":"context deadline exceeded"}`

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, h http.Handler, config Config, tracer trace.TracerProvider) *http.Server

Types

type Config

type Config struct {
	Port    int
	Timeout time.Duration
}

Config - base configuration for API

Jump to

Keyboard shortcuts

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