db

package
v0.0.0-...-cd87c42 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2016 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

本包只做mongodb的异步操作实现 只实现常用功能

复杂操作可以使用mongodb的原始接口进行操作

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URL       string // username:password@tcp(address:port)/dbname   ?authSource=admin
	ConnCount int32  // 连接量
}

type MongoDriver

type MongoDriver struct {
	*Config
	// contains filtered or unexported fields
}

func NewMongoDriver

func NewMongoDriver() *MongoDriver

func (*MongoDriver) Execute

func (self *MongoDriver) Execute(dbfunc func(sess *mgo.Session))

func (*MongoDriver) Start

func (self *MongoDriver) Start(cfg *Config) error

func (*MongoDriver) Stop

func (self *MongoDriver) Stop()

Jump to

Keyboard shortcuts

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