2021-06-08 15:11:18 -05:00
|
|
|
package config
|
2020-10-14 16:47:20 -05:00
|
|
|
|
2021-06-08 15:11:18 -05:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
2021-12-03 22:50:58 -05:00
|
|
|
"zotregistry.io/zot/pkg/extensions/sync"
|
2021-06-08 15:11:18 -05:00
|
|
|
)
|
2020-10-14 16:47:20 -05:00
|
|
|
|
|
|
|
type ExtensionConfig struct {
|
2021-10-15 10:05:00 -05:00
|
|
|
Search *SearchConfig
|
|
|
|
Sync *sync.Config
|
|
|
|
Metrics *MetricsConfig
|
2022-03-04 02:37:06 -05:00
|
|
|
Scrub *ScrubConfig
|
2020-10-14 16:47:20 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
type SearchConfig struct {
|
|
|
|
// CVE search
|
2021-06-08 13:37:31 -05:00
|
|
|
CVE *CVEConfig
|
2021-12-28 08:29:30 -05:00
|
|
|
Enable *bool
|
2020-10-14 16:47:20 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
type CVEConfig struct {
|
|
|
|
UpdateInterval time.Duration // should be 2 hours or more, if not specified default be kept as 24 hours
|
|
|
|
}
|
2021-10-15 10:05:00 -05:00
|
|
|
|
|
|
|
type MetricsConfig struct {
|
2021-12-28 08:29:30 -05:00
|
|
|
Enable *bool
|
2021-10-15 10:05:00 -05:00
|
|
|
Prometheus *PrometheusConfig
|
|
|
|
}
|
|
|
|
|
|
|
|
type PrometheusConfig struct {
|
|
|
|
Path string // default is "/metrics"
|
|
|
|
}
|
2022-03-04 02:37:06 -05:00
|
|
|
|
|
|
|
type ScrubConfig struct {
|
|
|
|
Interval time.Duration
|
|
|
|
}
|