3
0

Sync interval options

This commit is contained in:
Peter Grlica
2020-11-17 13:01:11 +01:00
parent d99975abea
commit 34ba878fc0

View File

@@ -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)