mirror of
https://github.com/caddyserver/caddy.git
synced 2026-06-30 13:53:03 +00:00
diagnostics: Implemented collection functions and create first metrics
- Also implemented robust error handling and failovers - Vendored klauspost/cpuid
This commit is contained in:
parent
8f0b44b8a4
commit
388ff6bc0a
20 changed files with 3336 additions and 4 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue