 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPServer ¶
type HTTPServer struct {
	// contains filtered or unexported fields
}
    HTTPServer represents an HTTP server with standard middleware
func NewHTTPServer ¶
func NewHTTPServer(opts Options) (*HTTPServer, error)
NewHTTPServer creates a new HTTP server with standard configuration
func (*HTTPServer) GetRouter ¶
func (s *HTTPServer) GetRouter() *gin.Engine
GetRouter returns the Gin router for additional configuration
func (*HTTPServer) Stop ¶
func (s *HTTPServer) Stop(ctx context.Context) error
Stop gracefully stops the HTTP server
func (*HTTPServer) WaitForShutdown ¶
func (s *HTTPServer) WaitForShutdown() error
WaitForShutdown waits for interrupt signal and gracefully shuts down
type MiddlewareStack ¶
type MiddlewareStack struct {
	Security      *security.SecurityMiddleware
	Common        *common.CommonMiddleware
	Observability *observability.SimpleObservabilityMiddleware
	Metrics       *metricsMiddleware.MetricsMiddleware
	Telemetry     *telemetryMiddleware.OpenTelemetryMiddleware
}
    MiddlewareStack holds the middleware components
type Options ¶
type Options struct {
	Config           *config.BaseConfig
	Logger           logger.Logger
	CustomMiddleware []gin.HandlerFunc
	HealthChecks     []observability.HealthCheck
	Routes           func(*gin.Engine) // Function to setup custom routes
	// OpenTelemetry configuration (optional)
	EnableOpenTelemetry bool
	OTelConfig          *telemetry.OpenTelemetryConfig
}
    Options for server configuration
 Click to show internal directories. 
   Click to hide internal directories.