add monitor options #6
|
@ -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