yii2-etcd Client component to access ETCD server

  1. Requirements
  2. Usage
  3. Resources

Yii2 extension to access Etcd service.

Etcd is a key-value store for distributed systems from CoreOS.

Requirements

  • Yii2
  • PHP7
  • Etcd service running

Usage

See the README.md on Github for details.

use weesee\etcd\Etcd;
    
// setup connection to Etcd
// setting root means all key are appended to this path
$etcd = new Etcd([
    'etcdUrl' => 'http://127.0.0.1:2379',
    'root'=>"/yii2-etcd-test/"
]);
    
// write key value pairs to etcd
if ($etcd->exists("name"))
    $etcd->update("name","value");  // updates "/yii2-etcd-test/name"
else
    $etcd->set("name","value");     // sets "/yii2-etcd-test/name"

Resources

0 0
1 follower
21 downloads
Yii Version: 2.0
License: GPL-3.0
Category: Web Service
Developed by: WeeSee
Created on: Feb 25, 2018
Last updated: 6 years ago

Downloads

show all

Related Extensions