From 410ca88465f065f244f88c1d4089cb0fa4a45799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20B=C3=BCtow?= Date: Mon, 10 Feb 2020 14:06:03 +0000 Subject: initial scheduled jobs --- internal/config/config.go | 3 +++ internal/config/server.go | 12 ++++++++++++ 2 files changed, 15 insertions(+) (limited to 'internal/config') 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. -- cgit v1.2.3