-
Notifications
You must be signed in to change notification settings - Fork 0
/
dtf_def.go
31 lines (26 loc) · 891 Bytes
/
dtf_def.go
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
package dtfdef
import (
"time"
"github.com/danenmao/pterergate-dtf/dtf/extconfig"
"github.com/danenmao/pterergate-dtf/dtf/taskmodel"
)
// 服务角色,指定不同的服务类型
type ServiceRole uint32
const (
ServiceRole_Manager ServiceRole = 1
ServiceRole_Generator ServiceRole = 2
ServiceRole_Scheduler ServiceRole = 3
ServiceRole_Executor ServiceRole = 4
ServiceRole_Collector ServiceRole = 5
)
// 服务配置
type ServiceConfig struct {
PrestopDuration time.Duration
MySQLServer extconfig.MySQLAddress
RedisServer extconfig.RedisAddress
MongoServer extconfig.MongoAddress
ExecutorService taskmodel.ExecutorInvoker
CollectorService taskmodel.CollectorInvoker
ExecutorHandlerRegister taskmodel.RegisterExecutorRequestHandler
CollectorHandlerRegister taskmodel.RegisterCollectorRequestHandler
}