Documentation ¶
Index ¶
- func BaseClose(dbType string, dbKey ...string)
- func BaseOpen(dbType string, options_ Options, dbKey ...string)
- func Close(dbKey ...string)
- func CloseMaster(dbKey ...string)
- func CloseSlave(dbKey ...string)
- func DB(dbKey ...string) *mongo.Database
- func Master(dbKey ...string) *mongo.Database
- func Open(options_ Options, dbKey ...string)
- func OpenMaster(options_ Options, dbKey ...string)
- func OpenSlave(options_ Options, dbKey ...string)
- func SetPick(pk func(dbKey string, dbType string, dbs []*Pool) (*Pool, error))
- func Slave(dbKey ...string) *mongo.Database
- type Options
- type Pool
- type Statistics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CloseMaster ¶
func CloseMaster(dbKey ...string)
func CloseSlave ¶
func CloseSlave(dbKey ...string)
func OpenMaster ¶
Types ¶
type Pool ¶
type Pool struct { MaxOpenConns int DatabaseName string Stats *Statistics Client *mongo.Client // contains filtered or unexported fields }
type Statistics ¶
func MasterStats ¶
func MasterStats(dbKey ...string) (Statistics, error)
func SlaveStats ¶
func SlaveStats(dbKey ...string) (Statistics, error)
func Stats ¶
func Stats(dbKey ...string) (Statistics, error)
Click to show internal directories.
Click to hide internal directories.