diff options
| author | Fuwn <[email protected]> | 2026-01-20 05:28:27 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-01-20 05:28:27 -0800 |
| commit | 3e45e1d7cd0c5357cb62a0f31b293b4b80eb9181 (patch) | |
| tree | 9882013ca3283d807442f541dc77f022faaff9e5 /internal/monitor/monitor.go | |
| parent | feat: Add configurable UI scale option (diff) | |
| download | kaze-3e45e1d7cd0c5357cb62a0f31b293b4b80eb9181.tar.xz kaze-3e45e1d7cd0c5357cb62a0f31b293b4b80eb9181.zip | |
feat: Add database connection monitoring type
Diffstat (limited to 'internal/monitor/monitor.go')
| -rw-r--r-- | internal/monitor/monitor.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/internal/monitor/monitor.go b/internal/monitor/monitor.go index 5ec283a..9a1ec15 100644 --- a/internal/monitor/monitor.go +++ b/internal/monitor/monitor.go @@ -34,7 +34,7 @@ type Monitor interface { // Name returns the monitor's name Name() string - // Type returns the monitor type (http, https, tcp, gemini, icmp, dns, graphql) + // Type returns the monitor type (http, https, tcp, gemini, icmp, dns, graphql, database) Type() string // Target returns the monitor target (URL or host:port) @@ -74,6 +74,8 @@ func New(cfg config.MonitorConfig) (Monitor, error) { return NewDNSMonitor(cfg) case "graphql": return NewGraphQLMonitor(cfg) + case "database", "db": + return NewDatabaseMonitor(cfg) default: return nil, &UnsupportedTypeError{Type: cfg.Type} } |