summaryrefslogtreecommitdiffstats
path: root/einterfaces/jobs
diff options
context:
space:
mode:
Diffstat (limited to 'einterfaces/jobs')
-rw-r--r--einterfaces/jobs/data_retention.go4
-rw-r--r--einterfaces/jobs/elasticsearch.go22
2 files changed, 24 insertions, 2 deletions
diff --git a/einterfaces/jobs/data_retention.go b/einterfaces/jobs/data_retention.go
index 340ed1b88..442f667fa 100644
--- a/einterfaces/jobs/data_retention.go
+++ b/einterfaces/jobs/data_retention.go
@@ -5,11 +5,11 @@ package jobs
import (
"github.com/mattermost/platform/model"
- "github.com/mattermost/platform/store"
)
type DataRetentionInterface interface {
- MakeJob(store store.Store) model.Job
+ MakeWorker() model.Worker
+ MakeScheduler() model.Scheduler
}
var theDataRetentionInterface DataRetentionInterface
diff --git a/einterfaces/jobs/elasticsearch.go b/einterfaces/jobs/elasticsearch.go
new file mode 100644
index 000000000..6d6dbe893
--- /dev/null
+++ b/einterfaces/jobs/elasticsearch.go
@@ -0,0 +1,22 @@
+// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+package jobs
+
+import (
+ "github.com/mattermost/platform/model"
+)
+
+type ElasticsearchIndexerInterface interface {
+ MakeWorker() model.Worker
+}
+
+var theElasticsearchIndexerInterface ElasticsearchIndexerInterface
+
+func RegisterElasticsearchIndexerInterface(newInterface ElasticsearchIndexerInterface) {
+ theElasticsearchIndexerInterface = newInterface
+}
+
+func GetElasticsearchIndexerInterface() ElasticsearchIndexerInterface {
+ return theElasticsearchIndexerInterface
+}