rwdatabasepool

package module
v0.0.0-...-27271ad Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2019 License: MIT Imports: 4 Imported by: 0

README

Read-write database pool in Go

Go Report Card Documentation

Install using: go get github.com/ludovicm67/go-rwdatabasepool

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct{}

Driver is the NoDatabase driver.

func (*Driver) Open

func (d *Driver) Open(name string) (driver.Conn, error)

Open opens a new connection to the database.

type RWDatabasePool

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

RWDatabasePool represents the read-write database pool.

func Init

func Init(write, read []*sql.DB) *RWDatabasePool

Init creates a RWDatabasePool using a write and a read pool.

func (*RWDatabasePool) Read

func (dbp *RWDatabasePool) Read() *sql.DB

func (*RWDatabasePool) Write

func (dbp *RWDatabasePool) Write() *sql.DB

Jump to

Keyboard shortcuts

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