driver

package
v0.0.0-...-69e45e2 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2015 License: Apache-2.0 Imports: 5 Imported by: 8

Documentation

Overview

外部 DB ドライバ。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoPoolSet

type MongoPoolSet struct {
	// contains filtered or unexported fields
}

mongodb のコネクションプール集。

func NewMongoPoolSet

func NewMongoPoolSet(timeout time.Duration) *MongoPoolSet

timeout: 接続を待つ期間。

func (*MongoPoolSet) Close

func (this *MongoPoolSet) Close()

func (*MongoPoolSet) Get

func (this *MongoPoolSet) Get(addr string) (*mgo.Session, error)

type RedisPoolSet

type RedisPoolSet struct {
	// contains filtered or unexported fields
}

redis のコネクションプール集。

func NewRedisPoolSet

func NewRedisPoolSet(timeout time.Duration, n int, keep time.Duration) *RedisPoolSet

timeout: 通信タイムアウト。 n: プール毎に確保する接続数。 keep: 確保する期間。

func (*RedisPoolSet) Close

func (this *RedisPoolSet) Close()

func (*RedisPoolSet) Get

func (this *RedisPoolSet) Get(addr string) *redis.Pool

type SqlPoolSet

type SqlPoolSet struct {
	// contains filtered or unexported fields
}

sql のコネクションプール集。

func NewSqlPoolSet

func NewSqlPoolSet(driverName string) *SqlPoolSet

func (*SqlPoolSet) Close

func (this *SqlPoolSet) Close()

func (*SqlPoolSet) Get

func (this *SqlPoolSet) Get(addr string) (*sql.DB, error)

Jump to

Keyboard shortcuts

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