{"modulePath":"github.com/lukcba-developers/gopherkit","version":"v1.0.3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package server\n\n## Types\n\n```go\ntype HTTPServer struct {\n\t// contains filtered or unexported fields\n}\n```\nHTTPServer represents an HTTP server with standard middleware\n\n```go\nfunc NewHTTPServer(opts Options) (*HTTPServer, error)\n```\nNewHTTPServer creates a new HTTP server with standard configuration\n\n```go\nfunc (s *HTTPServer) GetRouter() *gin.Engine\n```\nGetRouter returns the Gin router for additional configuration\n\n```go\nfunc (s *HTTPServer) Start() error\n```\nStart starts the HTTP server\n\n```go\nfunc (s *HTTPServer) Stop(ctx context.Context) error\n```\nStop gracefully stops the HTTP server\n\n```go\nfunc (s *HTTPServer) WaitForShutdown() error\n```\nWaitForShutdown waits for interrupt signal and gracefully shuts down\n\n```go\ntype MiddlewareStack struct {\n\tSecurity      *security.SecurityMiddleware\n\tCommon        *common.CommonMiddleware\n\tObservability *observability.SimpleObservabilityMiddleware\n\tMetrics       *metricsMiddleware.MetricsMiddleware\n\tTelemetry     *telemetryMiddleware.OpenTelemetryMiddleware\n}\n```\nMiddlewareStack holds the middleware components\n\n```go\ntype Options struct {\n\tConfig           *config.BaseConfig\n\tLogger           logger.Logger\n\tCustomMiddleware []gin.HandlerFunc\n\tHealthChecks     []observability.HealthCheck\n\tRoutes           func(*gin.Engine) // Function to setup custom routes\n\n\t// OpenTelemetry configuration (optional)\n\tEnableOpenTelemetry bool\n\tOTelConfig          *telemetry.OpenTelemetryConfig\n}\n```\nOptions for server configuration\n\n","path":"github.com/lukcba-developers/gopherkit/pkg/server","name":"server","synopsis":"","isRedistributable":true}
