diff options
| author | Fuwn <[email protected]> | 2026-01-19 04:32:18 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-01-19 04:32:18 -0800 |
| commit | 79e0fb6bc04737137afa6dd4f082c35aae9aab21 (patch) | |
| tree | 4ad863c31d85a594a52533a0cf8aa10fc8cc4d47 /internal/config | |
| parent | feat: Add retry option for monitor checks (diff) | |
| download | kaze-79e0fb6bc04737137afa6dd4f082c35aae9aab21.tar.xz kaze-79e0fb6bc04737137afa6dd4f082c35aae9aab21.zip | |
feat: Add Gemini protocol support
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/config.go | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index f7f1ad6..1c033e1 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -215,6 +215,12 @@ func (c *Config) applyDefaults() { m.VerifySSL = &defaultVerify } } + if m.Type == "gemini" { + if m.VerifySSL == nil { + defaultVerify := true + m.VerifySSL = &defaultVerify + } + } } } } @@ -247,10 +253,10 @@ func (c *Config) validate() error { } switch monitor.Type { - case "http", "https", "tcp": + case "http", "https", "tcp", "gemini": // Valid types default: - return fmt.Errorf("monitor %q has invalid type %q (must be http, https, or tcp)", monitor.Name, monitor.Type) + return fmt.Errorf("monitor %q has invalid type %q (must be http, https, tcp, or gemini)", monitor.Name, monitor.Type) } } } |