mongo

package
v0.0.0-...-fc17aaa Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMgo

func NewMgo(opt MgoOpt) (*mongo.Client, context.CancelFunc, error)

Types

type MgoOpt

type MgoOpt struct {
	Addr            []string `json:"addr" yaml:"addr"` // mongo addr
	Port            string   `json:"port" yaml:"port"`
	MaxConnIdleTime *uint64  `json:"max_conn_idle_time" yaml:"max_conn_idle_time"`
	MaxPoolSize     *uint64  `json:"max_pool_size" yaml:"max_pool_size"`
	MinPoolSize     *uint64  `json:"min_pool_size" yaml:"min_pool_size"`
	ConnectTimeout  *uint64  `json:"connect_timeout" yaml:"connect_timeout"`
	Username        string   `json:"username" yaml:"username"`
	Password        string   `json:"password" yaml:"password"`
}

Jump to

Keyboard shortcuts

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