Esempio n. 1
0
 public function __construct($configPath, $options = [])
 {
     if (is_file($configPath)) {
         $this->config = Yaml::parse(file_get_contents($configPath));
         $sf = new consul\ServiceFactory($options);
         $this->kv = $sf->get('kv');
     }
 }
Esempio n. 2
0
 public function __construct()
 {
     $sf = new ServiceFactory();
     $this->catalog = $sf->get('catalog');
 }
 /**
  *
  */
 public function setUp()
 {
     $serviceFactory = new ServiceFactory(['base_url' => 'http://127.0.0.1:8500']);
     $this->multiLockHandlerFactory = new MultiLockHandlerFactory($serviceFactory->get('session'), $serviceFactory->get('kv'), 'test/lock/');
 }
Esempio n. 4
0
 /**
  *
  */
 public function setUp()
 {
     $serviceFactory = new ServiceFactory(['base_url' => 'http://127.0.0.1:8500']);
     $this->multiSemaphoreFactory = new MultiSemaphoreFactory($serviceFactory->get('session'), $serviceFactory->get('kv'), 'test/semaphore');
 }