mongodb

package
v0.24.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package mongodb provides an easy-to-use way to create a new Mongodb client. Configuration is limited, in the name of simplicity. More advanced clients should be created with the Mongodb driver instead.

Index

Constants

This section is empty.

Variables

View Source
var ErrClientConfig = errors.New("mongodb: bad config for client")

Functions

func New added in v0.24.0

func New(opts ClientOptions) (*mongo.Client, error)

New creates a new opinionated client.

Types

type ClientOptions added in v0.24.0

type ClientOptions struct {
	// PoolSize is the maximum number of connections allowed
	// to the server.
	PoolSize uint64
	// URI is the Mongodb connection URI.
	URI string
	// UseNewRelic allows clients to add New Relic database
	// segment monitoring.
	UseNewRelic bool
}

ClientOptions provides some limited configuration for clients created with NewClient.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL