2017 © Pedro Peláez
 

library remote

A remote client based on Guzzle 6

image

baohan/remote

A remote client based on Guzzle 6

  • Sunday, October 2, 2016
  • by baohanddd
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 14 % Grown

The README.md

swoole-gearman

A multi-processes worker framework based on Swoole and Gearman, (*1)

Install

Install swoole and gearman first., (*2)

How

Quick start, (*3)


$worker = new \baohan\SwooleGearman\Queue\Worker(); $worker->addCallback('user::created'); $worker->addCallback('user::updated'); $router = new \baohan\SwooleGearman\Router(); $router->setPrefix("\\App\\Job\\"); $router->setExecutor("execute"); $router->setDecode(function($payload) { return \json_decode($payload, true); }); $worker->addRouter($router); $serv = new \baohan\SwooleGearman\Server($worker); $serv->setSwoolePort(9505); // custom callback event $serv->setEvtStart(function($serv) { echo "server start!" . PHP_EOL; }); $serv->start();

Configure

Event callbacks, (*4)

The Versions

02/10 2016

dev-master

9999999-dev

A remote client based on Guzzle 6

  Sources   Download

MIT

The Requires