From 34ba878fc03243fb7a444c937b752ccae0010c06 Mon Sep 17 00:00:00 2001 From: Peter Grlica Date: Tue, 17 Nov 2020 13:01:11 +0100 Subject: [PATCH] Sync interval options --- pkg/options/federation.go | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/pkg/options/federation.go b/pkg/options/federation.go index 5bf77fee2..c7e48b3d6 100644 --- a/pkg/options/federation.go +++ b/pkg/options/federation.go @@ -1,19 +1,29 @@ package options +import "time" + type ( FederationOpt struct { - Enabled bool `env:"FEDERATION_ENABLED"` - Label string `env:"FEDERATION_LABEL"` - Host string `env:"FEDERATION_HOST"` + Enabled bool `env:"FEDERATION_ENABLED"` + Label string `env:"FEDERATION_LABEL"` + Host string `env:"FEDERATION_HOST"` + StructureMonitorInterval time.Duration `env:"FEDERATION_SYNC_STRUCTURE_MONITOR_INTERVAL"` + StructurePageSize int `env:"FEDERATION_SYNC_STRUCTURE_PAGE_SIZE"` + DataMonitorInterval time.Duration `env:"FEDERATION_SYNC_DATA_MONITOR_INTERVAL"` + DataPageSize int `env:"FEDERATION_SYNC_DATA_PAGE_SIZE"` } ) func Federation() (o *FederationOpt) { o = &FederationOpt{ - Enabled: false, - Label: `Example host`, - Host: `example.tld`, + Enabled: false, + Label: `Example host`, + Host: `example.tld`, + StructureMonitorInterval: 3600, + StructurePageSize: 100, + DataMonitorInterval: 3600, + DataPageSize: 100, } fill(o)