Documentation
¶
Index ¶
- type HealthStatus
- type Server
- func (s *Server) Addr() string
- func (s *Server) RegisterHealth()
- func (s *Server) RegisterMetrics()
- func (s *Server) RegisterPPROF()
- func (s *Server) RegisterWebhook(bot *gotgbot.Bot, dispatcher *ext.Dispatcher, secret, domain string) error
- func (s *Server) Start() error
- func (s *Server) Stop() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HealthStatus ¶
type HealthStatus struct {
Status string `json:"status"`
Checks map[string]bool `json:"checks"`
Version string `json:"version"`
Uptime string `json:"uptime"`
}
HealthStatus represents the health status of the application
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents a unified HTTP server that consolidates health, webhook, and metrics endpoints
func (*Server) RegisterHealth ¶
func (s *Server) RegisterHealth()
RegisterHealth registers the /health endpoint
func (*Server) RegisterMetrics ¶
func (s *Server) RegisterMetrics()
RegisterMetrics registers the /metrics endpoint for Prometheus
func (*Server) RegisterPPROF ¶
func (s *Server) RegisterPPROF()
RegisterPPROF registers pprof endpoints for performance profiling. This should only be enabled in development environments.
func (*Server) RegisterWebhook ¶
func (s *Server) RegisterWebhook(bot *gotgbot.Bot, dispatcher *ext.Dispatcher, secret, domain string) error
RegisterWebhook registers the webhook endpoint and configures the Telegram webhook
Click to show internal directories.
Click to hide internal directories.