server

package
v0.0.0-...-7018970 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChiRouter

func NewChiRouter(logger *slog.Logger) *chi.Mux

NewChiRouter creates a new Chi router with a set of middleware for request ID injection, structured logging, telemetry, and recovery.

func NewGRPCServer

func NewGRPCServer(enableReflection bool, registerFunc ...RegistrationFunc) *grpc.Server

NewGRPCServer creates a new gRPC server instance with optional reflection and service registration.

func NewHTTPServer

func NewHTTPServer(cfg config.HTTPConfig, handler http.Handler) *http.Server

NewHTTPServer creates and configures a new HTTP server instance.

Types

type HTTPConfig

type HTTPConfig struct {
	Port           int
	MaxHeaderBytes int
	ReadTimeout    time.Duration
	WriteTimeout   time.Duration
	IdleTimeout    time.Duration
	ReadHeader     time.Duration
}

HTTPConfig has the configuration for the HTTP server.

type RegistrationFunc

type RegistrationFunc func(*grpc.Server)

RegistrationFunc registers a grpc service with the server.

Jump to

Keyboard shortcuts

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