mongodb

package
v0.0.0-...-2bd70a3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	App             string
	Hosts           []string
	MaxConnIdleTime int
	MaxPoolSize     uint64
	MinPoolSize     uint64
}

type Mongo

type Mongo struct {
	*mongo.Client
	// contains filtered or unexported fields
}

func NewConnection

func NewConnection(cfg Config, opts ...Option) (Mongo, func())

type Option

type Option func(*Mongo)

func WithLogger

func WithLogger(logger log.Logger) Option

func WithMonitor

func WithMonitor(able bool, interval time.Duration) Option

func WithTracer

func WithTracer(tracer opentracing.Tracer) Option

Jump to

Keyboard shortcuts

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