package
0.0.0-20231027131641-93b1e7503408
Repository: https://github.com/lightstar/golib.git
Documentation: pkg.go.dev
# Functions
MustNewClient function creates new mongo client with provided options and panics on any error.
NewClient function creates new mongo client with provided options.
WithAddress option applies provided mongo server address.
WithConfig option retrieves configuration from provided configuration service.
WithConnectTimeout option applies provided mongo client connect timeout in seconds.
WithSocketTimeout option applies provided mongo client socket timeout in seconds.
# Constants
DefAddress is the default mongo server address.
DefConnectTimeout is the default mongo client connect timeout in seconds.
DefSocketTimeout is the default mongo client socket timeout in seconds.
# Interfaces
ConfigService interface used to obtain configuration from somewhere into some specific structure.