summaryrefslogtreecommitdiff
path: root/internal/config
diff options
context:
space:
mode:
authorPaul Bütow <pbuetow@mimecast.com>2020-02-10 14:06:03 +0000
committerPaul Bütow <pbuetow@mimecast.com>2020-02-10 14:06:03 +0000
commit410ca88465f065f244f88c1d4089cb0fa4a45799 (patch)
tree5991a94cf29da0e6599e7263ba9c1cfd9e769a23 /internal/config
parent75c530dcd9fbe3376f3a3c617663af0303a935e3 (diff)
initial scheduled jobs
Diffstat (limited to 'internal/config')
-rw-r--r--internal/config/config.go3
-rw-r--r--internal/config/server.go12
2 files changed, 15 insertions, 0 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 0f26635..d20a480 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -9,6 +9,9 @@ import (
// ControlUser is used for various DTail specific operations.
const ControlUser string = "DTAIL-CONTROL-USER"
+// ScheduledUser is used for scheduled queries.
+const ScheduledUser string = "DTAIL-SCHEDULED-USER"
+
// Client holds a DTail client configuration.
var Client *ClientConfig
diff --git a/internal/config/server.go b/internal/config/server.go
index 7883b33..be6d45e 100644
--- a/internal/config/server.go
+++ b/internal/config/server.go
@@ -13,6 +13,16 @@ type Permissions struct {
Users map[string][]string
}
+// Scheduled allows to configure scheduled mapreduce jobs.
+type Scheduled struct {
+ Name string
+ ConnectionsPerCPU int
+ Discovery string
+ Files string
+ Query string
+ Servers string
+}
+
// ServerConfig represents the server configuration.
type ServerConfig struct {
// The SSH server bind port.
@@ -31,6 +41,8 @@ type ServerConfig struct {
HostKeyFile string
// The host key size in bits
HostKeyBits int
+ // Scheduled mapreduce jobs.
+ Schedule []Scheduled `json:",omitempty"`
}
// Create a new default server configuration.