Path: blob/main/pkg/metrics/instance/configstore/errors.go
5308 views
package configstore12import "fmt"34// ErrNotConnected is used when a store operation was called but no connection5// to the store was active.6var ErrNotConnected = fmt.Errorf("not connected to store")78// NotExistError is used when a config doesn't exist.9type NotExistError struct {10Key string11}1213// Error implements error.14func (e NotExistError) Error() string {15return fmt.Sprintf("configuration %s does not exist", e.Key)16}1718// NotUniqueError is used when two scrape jobs have the same name.19type NotUniqueError struct {20ScrapeJob string21}2223// Error implements error.24func (e NotUniqueError) Error() string {25return fmt.Sprintf("found multiple scrape configs in config store with job name %q", e.ScrapeJob)26}272829