t4g/ha-proxy 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

t4g/ha-proxy

Composer 安装命令:

composer require t4g/ha-proxy

包简介

Basic HAProxy Split R/W implementation for PDO

README 文档

README

##Introduction

This project exposes the following namespaces for use in your custom use:

  • CSI\Drivers\PDO\HAProxy

EXAMPLE

For Vanilla FW

	use CSI\Drivers\PDO

	$proxy = new HAProxy();
	$proxy->CreatMaster('mysql:host=MASTER_DB_HOST;dbname=MASTER_DB_NAME','MASTER_DB_USER','MASTER_DB_PASSWORD');
	$proxy->CreateReadonly( 'mysql:host=readonly_DB_HOST;dbname=readonly_DB_NAME','readonly_DB_USER','readonly_DB_PASSWORD');


	// Framework::setup($proxy);

For PDO override

	use CSI\Drivers\PDO\HAProxy as PDO;

or:

	if ($dsn instanceof PDO || $dsn instanceof HAProxy) {

	This line happens twice on current RedBean v3.0.1, on lines 29 and 1937 on rb.php file. Repalce both.

or:

	$SOME_PDO  ...

	$SOME_PDO = new HAProxy($SOME_PDO);
	$SOME_PDO->CreateReadonly( 'mysql:host=readonly_DB_HOST;dbname=readonly_DB_NAME','readonly_DB_USER','readonly_DB_PASSWORD');


	\PDO $SOME_PDO  ...

Limitations

HAProxy supports the simplest MySQL Replication setup, where you have a Master, and a readonly.

Contributors & Authors

@t4g @mauricoder

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-08-18

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固