mirror of
https://github.com/caddyserver/caddy.git
synced 2026-05-30 03:15:40 -04:00
diagnostics: Implemented collection functions and create first metrics
- Also implemented robust error handling and failovers - Vendored klauspost/cpuid
This commit is contained in:
@@ -29,6 +29,7 @@ import (
|
||||
"github.com/mholt/caddy/caddyfile"
|
||||
"github.com/mholt/caddy/caddyhttp/staticfiles"
|
||||
"github.com/mholt/caddy/caddytls"
|
||||
"github.com/mholt/caddy/diagnostics"
|
||||
)
|
||||
|
||||
const serverType = "http"
|
||||
@@ -205,6 +206,8 @@ func (h *httpContext) MakeServers() ([]caddy.Server, error) {
|
||||
}
|
||||
}
|
||||
|
||||
diagnostics.Set("num_sites", len(h.siteConfigs))
|
||||
|
||||
// we must map (group) each config to a bind address
|
||||
groups, err := groupSiteConfigsByListenAddr(h.siteConfigs)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user