server

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2026 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Package server provides the unified server functionality.

Package server provides the unified server functionality.

cmd/server/signals.go Package server provides signal handling utilities.

cmd/server/worker.go Package server provides monitoring worker functionality. Wave 2: Contains extracted worker code from apps/worker/main.go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HealthCheckHandler

func HealthCheckHandler() gin.HandlerFunc

func RegisterAPIRoutes

func RegisterAPIRoutes(r *gin.Engine, hub *handlers.Hub, cfg *configs.Config)

RegisterAPIRoutes registers all API routes on the given Gin engine

func RunServer

func RunServer() error

RunServer starts the unified server with API, Worker, and Web functionality

func SeedAdmin

func SeedAdmin(db *mongo.Database, cfg *configs.Config)

func SetupShutdownSignalHandler

func SetupShutdownSignalHandler(cancel context.CancelFunc, timeout time.Duration)

SetupShutdownSignalHandler sets up a signal handler for graceful shutdown

func StartWorker

func StartWorker(ctx context.Context, db *mongo.Database, rdb *redis.Client)

StartWorker starts the monitoring worker

func StaticFileServer

func StaticFileServer() gin.HandlerFunc

func StopWorker

func StopWorker() error

StopWorker gracefully stops the monitoring worker

Types

type HealthResponse

type HealthResponse struct {
	Status  string `json:"status"`
	MongoDB string `json:"mongodb"`
	Redis   string `json:"redis"`
}

Jump to

Keyboard shortcuts

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