diff options
| author | Paul Buetow <pbuetow@mimecast.com> | 2020-07-03 12:15:59 +0100 |
|---|---|---|
| committer | Paul Buetow <pbuetow@mimecast.com> | 2020-07-03 12:15:59 +0100 |
| commit | eb9c8d4ae7f8fb7e65f912ff4838c7737b5487d0 (patch) | |
| tree | f5e6c0be15200b18f306878037c3896e1084cf53 /internal/config | |
| parent | 912f7dce7222d345dc6cc6cc593a45ee7e2e15f8 (diff) | |
refactor mapr client
Diffstat (limited to 'internal/config')
| -rw-r--r-- | internal/config/server.go | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/internal/config/server.go b/internal/config/server.go index 43b4c34..4166fd3 100644 --- a/internal/config/server.go +++ b/internal/config/server.go @@ -13,8 +13,8 @@ type Permissions struct { Users map[string][]string } -// Scheduled allows to configure scheduled mapreduce jobs. -type Scheduled struct { +// JobCommons summarises common job fields +type JobCommons struct { Name string Enable bool Files string @@ -22,21 +22,19 @@ type Scheduled struct { Outfile string `json:",omitempty"` Discovery string `json:",omitempty"` Servers []string `json:",omitempty"` - TimeRange [2]int AllowFrom []string `json:",omitempty"` } -// Monitoring on log files. -type Monitoring struct { - Name string - Enable bool - Files string - Query string - ExcludeRegexes []string `json:",omitempty"` - Outfile string `json:",omitempty"` - Discovery string `json:",omitempty"` - Servers []string `json:",omitempty"` - AllowFrom []string `json:",omitempty"` +// Scheduled allows to configure scheduled mapreduce jobs. +type Scheduled struct { + JobCommons + TimeRange [2]int +} + +// Continuous allows to configure continuous running mapreduce jobs. +type Continuous struct { + JobCommons + RestartOnDayChange bool `json:",omitempty"` } // ServerConfig represents the server configuration. @@ -59,8 +57,8 @@ type ServerConfig struct { HostKeyBits int // Scheduled mapreduce jobs. Schedule []Scheduled `json:",omitempty"` - // Monitoring on log files. - Monitoring []Monitoring `json:",omitempty"` + // Continuous mapreduce jobs + Continuous []Continuous `json:",omitempty"` } // Create a new default server configuration. |
