@@ -32,11 +32,9 @@ type BinLogStream struct {
32
32
}
33
33
34
34
func NewBinLogStream () * BinLogStream {
35
- gbeConfig := conf .GetConfig ()
36
-
37
35
redisClient := redis .NewClient (& redis.Options {
38
- Addr : gbeConfig .Redis .Addr ,
39
- Password : gbeConfig .Redis .Password ,
36
+ Addr : conf . Config .Redis .Addr ,
37
+ Password : conf . Config .Redis .Password ,
40
38
DB : 0 ,
41
39
})
42
40
@@ -158,16 +156,15 @@ func (s *BinLogStream) getColumnIndexByName(e *canal.RowsEvent, name string) int
158
156
}
159
157
160
158
func (s * BinLogStream ) Start () {
161
- gbeConfig := conf .GetConfig ()
162
159
163
160
cfg := canal .NewDefaultConfig ()
164
- cfg .Addr = gbeConfig .DataSource .Addr
165
- cfg .User = gbeConfig .DataSource .User
166
- cfg .Password = gbeConfig .DataSource .Password
161
+ cfg .Addr = conf . Config .DataSource .Addr
162
+ cfg .User = conf . Config .DataSource .User
163
+ cfg .Password = conf . Config .DataSource .Password
167
164
cfg .Dump .ExecutionPath = ""
168
- cfg .Dump .TableDB = gbeConfig .DataSource .Database
165
+ cfg .Dump .TableDB = conf . Config .DataSource .Database
169
166
cfg .ParseTime = true
170
- cfg .IncludeTableRegex = []string {gbeConfig .DataSource .Database + "\\ ..*" }
167
+ cfg .IncludeTableRegex = []string {conf . Config .DataSource .Database + "\\ ..*" }
171
168
cfg .ExcludeTableRegex = []string {"mysql\\ ..*" }
172
169
c , err := canal .NewCanal (cfg )
173
170
if err != nil {
0 commit comments