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'); } }
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/'); }
/** * */ 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'); }