server

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 10 Imported by: 1

Documentation

Overview

Package server is the package responsible for http server

Index

Constants

View Source
const PrefixConfig = "API_"

PrefixConfig is the environment prefix ex: HOST_PORT will be added API_ as prefix.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, cnf Config, handler http.Handler, log ilog.Logger)

Run the server http.

Types

type Config

type Config struct {
	Addr             string        `env:"HOST_PORT,required"`
	GracefulDuration time.Duration `env:"GRACEFUL_WAIT_TIME,required"`
}

Config is the API Server Configuration.

Directories

Path Synopsis
Package middleware is about middlewares that must be added to chi handler.
Package middleware is about middlewares that must be added to chi handler.

Jump to

Keyboard shortcuts

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