blob: ca05b2ef39699e165768e8cd385ffd30e04e49a9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
// 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
}
type ElasticsearchAggregatorInterface interface {
MakeWorker() model.Worker
MakeScheduler() model.Scheduler
}
var theElasticsearchAggregatorInterface ElasticsearchAggregatorInterface
func RegisterElasticsearchAggregatorInterface(newInterface ElasticsearchAggregatorInterface) {
theElasticsearchAggregatorInterface = newInterface
}
func GetElasticsearchAggregatorInterface() ElasticsearchAggregatorInterface {
return theElasticsearchAggregatorInterface
}
|