mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2026-02-04 08:18:34 +00:00
feat(BRIDGE-396): Observability metrics for vault issues; Extension to observability service to support caching
This commit is contained in:
@ -215,6 +215,14 @@ func (l *Locations) ProvideUnleashStartupCachePath() (string, error) {
|
||||
return l.getUnleashStartupCachePath(), nil
|
||||
}
|
||||
|
||||
func (l *Locations) ProvideObservabilityMetricsCachePath() (string, error) {
|
||||
if err := os.MkdirAll(l.getObservabilityMetricsCachePath(), 0o700); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return l.getObservabilityMetricsCachePath(), nil
|
||||
}
|
||||
|
||||
func (l *Locations) getGluonCachePath() string {
|
||||
return filepath.Join(l.userData, "gluon")
|
||||
}
|
||||
@ -257,6 +265,10 @@ func (l *Locations) getUnleashStartupCachePath() string {
|
||||
return filepath.Join(l.userCache, "unleash_startup_cache")
|
||||
}
|
||||
|
||||
func (l *Locations) getObservabilityMetricsCachePath() string {
|
||||
return filepath.Join(l.userCache, "observability_cache")
|
||||
}
|
||||
|
||||
// Clear removes everything except the lock and update files.
|
||||
func (l *Locations) Clear(except ...string) error {
|
||||
return files.Remove(
|
||||
|
||||
Reference in New Issue
Block a user