master
go 17 lines 326 Bytes
Raw
1 // SPDX-License-Identifier: GPL-3.0-or-later
2
3 package ceph
4
5 import (
6 "fmt"
7 )
8
9 func (c *Collector) validateConfig() error {
10 if c.URL == "" {
11 return fmt.Errorf("URL is required but not set")
12 }
13 if c.Username == "" || c.Password == "" {
14 return fmt.Errorf("username and password are required but not set")
15 }
16 return nil
17 }