2021-06-08 23:11:18 +03:00
|
|
|
package config
|
2020-10-14 14:47:20 -07:00
|
|
|
|
2021-06-08 23:11:18 +03:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
2021-12-04 03:50:58 +00:00
|
|
|
"zotregistry.io/zot/pkg/extensions/sync"
|
2021-06-08 23:11:18 +03:00
|
|
|
)
|
2020-10-14 14:47:20 -07:00
|
|
|
|
|
|
|
type ExtensionConfig struct {
|
2021-10-15 18:05:00 +03:00
|
|
|
Search *SearchConfig
|
|
|
|
Sync *sync.Config
|
|
|
|
Metrics *MetricsConfig
|
2022-03-04 09:37:06 +02:00
|
|
|
Scrub *ScrubConfig
|
2020-10-14 14:47:20 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
type SearchConfig struct {
|
|
|
|
// CVE search
|
2021-06-08 21:37:31 +03:00
|
|
|
CVE *CVEConfig
|
2021-12-28 15:29:30 +02:00
|
|
|
Enable *bool
|
2020-10-14 14:47:20 -07: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 18:05:00 +03:00
|
|
|
|
|
|
|
type MetricsConfig struct {
|
2021-12-28 15:29:30 +02:00
|
|
|
Enable *bool
|
2021-10-15 18:05:00 +03:00
|
|
|
Prometheus *PrometheusConfig
|
|
|
|
}
|
|
|
|
|
|
|
|
type PrometheusConfig struct {
|
|
|
|
Path string // default is "/metrics"
|
|
|
|
}
|
2022-03-04 09:37:06 +02:00
|
|
|
|
|
|
|
type ScrubConfig struct {
|
|
|
|
Interval time.Duration
|
|
|
|
}
|