func (dbs *DBs) GetAllSlaves() ([]*sqlx.DB, int) {
	return dbs.getDBs(dbs._slaves)
}
GetAllSlaves get all slave database connections, included failing one.
package mssqlx
import (
	"context"
	"database/sql"
	"errors"
	"os"
	"sync"
	"time"
	"github.com/hashicorp/go-multierror"
	"github.com/jmoiron/sqlx"
)
var (
	ErrNoConnection = errors.New("no connection available")
	ErrNoConnectionOrWsrep = errors.New("no connection available or Wsrep is not ready")
)
const (
	DefaultHealthCheckPeriodInMilli = 40
)
var hostName string
func init() {
	hostName, _ = os.Hostname()
}
func ping(w *wrapper) (err error) {
	_, err = w.db.Exec("SELECT 1")
	return
}
type DBs struct {
	driverName      string
	readQuerySource ReadQuerySource
	masters *balancer
	slaves  *balancer
	all     *balancer
	_masters []*wrapper
	_slaves  []*wrapper
	_all     []*wrapper
}
func (dbs *DBs) DriverName() string {
	return dbs.driverName
}
func (dbs *DBs) getDBs(s []*wrapper) ([]*sqlx.DB, int) {
	n := len(s)
	r := make([]*sqlx.DB, n)
	for i, v := range s {
		r[i] = v.db
	}
	return r, n
}
func (dbs *DBs) readBalancer() *balancer {
	if dbs.readQuerySource == ReadQuerySourceAll {
		return dbs.all
	}
	return dbs.slaves
}
func (dbs *DBs) GetAllMasters() ([]*sqlx.DB, int) {
	return dbs.getDBs(dbs._masters)
}