Merge pull request #6 from Selly-Modules/add-monitor
add monitor options
This commit is contained in:
commit
1daf5b3f1e
|
@ -56,6 +56,9 @@ func Connect(cfg Config) (*mongo.Database, error) {
|
||||||
Password: opts.Password,
|
Password: opts.Password,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if cfg.Monitor != nil {
|
||||||
|
connectOptions.SetMonitor(cfg.Monitor)
|
||||||
|
}
|
||||||
|
|
||||||
// Connect
|
// Connect
|
||||||
client, err := mongo.Connect(context.Background(), connectOptions.ApplyURI(cfg.Host))
|
client, err := mongo.Connect(context.Background(), connectOptions.ApplyURI(cfg.Host))
|
||||||
|
|
Loading…
Reference in New Issue