func OptionConnectionPoolLimit(poolLimit int) Option {
	return func(c *config) {
		c.poolLimit = poolLimit
	}
}
OptionConnectionPoolLimit sets maximum size of the connection pool.
package manipmongo
import (
	"crypto/tls"
	"time"
	"github.com/globalsign/mgo/bson"
	"go.aporeto.io/elemental"
	"go.aporeto.io/manipulate"
)
type Option func(*config)
type config struct {
	username            string
	password            string
	authsource          string
	tlsConfig           *tls.Config
	poolLimit           int
	connectTimeout      time.Duration
	socketTimeout       time.Duration
	readConsistency     manipulate.ReadConsistency
	writeConsistency    manipulate.WriteConsistency
	sharder             Sharder
	defaultRetryFunc    manipulate.RetryFunc
	forcedReadFilter    bson.D
	attributeEncrypter  elemental.AttributeEncrypter
	explain             map[elemental.Identity]map[elemental.Operation]struct{}
	attributeSpecifiers map[elemental.Identity]elemental.AttributeSpecifiable
}
func newConfig() *config {
	return &config{
		poolLimit:        4096,
		connectTimeout:   10 * time.Second,
		socketTimeout:    60 * time.Second,
		readConsistency:  manipulate.ReadConsistencyDefault,
		writeConsistency: manipulate.WriteConsistencyDefault,
	}
}
func OptionCredentials(username, password, authsource string) Option {
	return func(c *config) {
		c.username = username
		c.password = password
		c.authsource = authsource
	}
}
func OptionTLS(tlsConfig *tls.Config) Option {
	return func(c *config) {
		c.tlsConfig = tlsConfig
	}
}