db

package
v0.0.0-...-3812866 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMongoDb

func GetMongoDb(cfg *common.CfgMg) (*mgo.Database, error)

func GetMongoSession

func GetMongoSession(cfg *common.CfgMg) *mgo.Session

Types

type MgoHelper

type MgoHelper struct {
	Addr      []string
	User      string
	Password  string
	PoolLimit int
	FailFast  bool
	Session   *mgo.Session
	Source    string
}

func (*MgoHelper) Connect

func (mh *MgoHelper) Connect(cfg *common.CfgMg) error

Connect connect to mongo server

type Redis

type Redis struct {
	Options redis.Options
	Client  *redis.Client
}

Redis struct for use

func GetRedisDb

func GetRedisDb(cfg *common.CfgRd) *Redis

GetRedisDb method

Jump to

Keyboard shortcuts

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