server

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Package server contains the HTTP server for the application. This layer is responsible for initializing the server and its dependencies. in more details: - setting up the middleware - setting up the database - setting up the repositories - setting up the services - setting up the routes

Index

Constants

View Source
const (
	SERVER_STARTUP_TIMEOUT  = 10 * time.Second
	REQUEST_READ_TIMEOUT    = 15 * time.Second
	RESPONSE_WRITE_TIMEOUT  = 15 * time.Second
	CONNECTION_IDLE_TIMEOUT = 20 * time.Second
	REQUETS_BODY_LIMIT      = 512 * 1024 // 512KB
	LOOPBACK                = "127.0.0.1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server represents the HTTP server and its dependencies

func New

func New(config *config.Config, srvLogger *slog.Logger) (*Server, error)

New creates a new server instance with the given configuration and options

func (*Server) Run

func (s *Server) Run() error

Jump to

Keyboard shortcuts

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