mongodb

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opt *Options) (*mongo.Client, error)

New creates a new mongodb client driver given the uri. It tries to ping the server before returning the client.

Types

type Options

type Options struct {

	// ConnDeadline contains the max time to
	// stablish a connection with the database.
	ConnDeadline time.Duration
	// contains filtered or unexported fields
}

Options contains the url and a deadline to establish a connection with the database.

type Pool

type Pool struct {
	*mongo.Client
}

Pool wraps the mongodb client.

Jump to

Keyboard shortcuts

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