# Functions
AlgorithmLoader load LoadBalanceAlgorithm by loadBalanceType.
NewActualDataSource create an actual datasource through dsn.
NewClusterDataSource create a clusterDataSource by yaml clusterConfiguration and remote etcd clusterConfiguration, and listen remote activeKey, when remote activeKey changes, change the clusterDataSource's active node.
@param nodeName: node datasource name @param loadBalanceType: random or round-robin @param masterName: master datasource name @param slavesName: salves datasources name.
# Constants
DsnFmt mysql dsn Example: username:password@protocol(address)/dbname?param=value, see details https://github.com/go-sql-driver/mysql#dsn-data-source-name.
No description provided by the author
No description provided by the author
# Structs
ActualDataSource an actual datasource which contains actual dsn.
ClusterDataSource which have auto change target datasource capabilities.
NodeDataSource have read/write separation and failure retry capabilities.
RandomLoadBalanceAlgorithm get actualDataSource from salves randomly.
RoundRobinLoadBalanceAlgorithm get actualDataSource from salves in order.
# Interfaces
DataSource interface.
LoadBalanceAlgorithm Read/write separation load balance algorithm interface.