Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // URI example: mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb][?options]] // URI Reference: https://docs.mongodb.com/manual/reference/connection-string/ Uri string `json:"uri"` Database string `json:"database"` Coll string `json:"coll"` // ConnectTimeoutMS specifies a timeout that is used for creating connections to the server. // If set to 0, no timeout will be used. // The default is 30 seconds. ConnectTimeoutMS *int64 `json:"connectTimeoutMS"` // MaxPoolSize specifies that maximum number of connections allowed in the driver's connection pool to each server. // If this is 0, it will be set to math.MaxInt64, // The default is 100. MaxPoolSize *uint64 `json:"maxPoolSize"` // MinPoolSize specifies the minimum number of connections allowed in the driver's connection pool to each server. If // this is non-zero, each server's pool will be maintained in the background to ensure that the size does not fall below // the minimum. This can also be set through the "minPoolSize" URI option (e.g. "minPoolSize=100"). The default is 0. MinPoolSize *uint64 `json:"minPoolSize"` // SocketTimeoutMS specifies how long the driver will wait for a socket read or write to return before returning a // network error. If this is 0 meaning no timeout is used and socket operations can block indefinitely. // The default is 300,000 ms. SocketTimeoutMS *int64 `json:"socketTimeoutMS"` }
Config for initial mongo instance
Click to show internal directories.
Click to hide internal directories.