2017 © Pedro Peláez
 

library etcd-php

Etcd client library for PHP

image

binwiederhier/etcd-php

Etcd client library for PHP

  • Sunday, July 24, 2016
  • by binwiederhier
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12,012 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 34 Forks
  • 0 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

Build Status Latest Stable Version Total Downloads Latest Unstable Version License, (*1)

Etcd client library for PHP

etcd is a distributed configuration system, part of the coreos project., (*2)

This repository provides a client library for etcd for PHP applications., (*3)

Installing and running etcd

git clone https://github.com/coreos/etcd.git
cd etcd
./build
./bin/etcd
````

## Brought to you by the LinkORB Engineering team

Check out our other projects at [linkorb.com/engineering](http://www.linkorb.com/engineering).

Btw, we're hiring!


## Usage

### The client

```php
    $client = new Client($server);
    $client->set('/foo', 'fooValue');
    // Set the ttl
    $client->set('/foo', 'fooValue', 10);
    // get key value
    echo $client->get('/foo');

    // Update value with key
    $client->update('/foo', 'newFooValue');

    // Delete key
    $client->rm('/foo');

    // Create a directory
    $client->mkdir('/fooDir');
    // Remove dir
    $client->rmdir('/fooDir');

The command line tool

Setting Key Values

Set a value on the /foo/bar key:, (*4)

$ bin/etcd-php etcd:set /foo/bar "Hello world"

Set a value on the /foo/bar key with a value that expires in 60 seconds:, (*5)

$ bin/etcd-php etcd:set /foo/bar "Hello world" --ttl=60

Create a new key /foo/bar, only if the key did not previously exist:, (*6)

$ bin/etcd-php etcd:mk /foo/new_bar "Hello world"

Create a new dir /fooDir, only if the key did not previously exist:, (*7)

$ bin/etcd-php etcd:mkdir /fooDir

Update an existing key /foo/bar, only if the key already existed:, (*8)

$ bin/etcd-php etcd:update /foo/bar "Hola mundo"

Create or update a directory called /mydir:, (*9)

$ bin/etcd-php etcd:setDir /mydir

Retrieving a key value

Get the current value for a single key in the local etcd node:, (*10)

$ bin/etcd-php etcd:get /foo/bar

Listing a directory

Explore the keyspace using the ls command, (*11)

$ bin/etcd-php etcd:ls
/akey
/adir
$ bin/etcd-php etcd:ls /adir
/adir/key1
/adir/key2

Add -recursive to recursively list subdirectories encountered., (*12)

$ bin/etcd-php etcd:ls --recursive
/foo
/foo/bar
/foo/new_bar
/fooDir

Deleting a key

Delete a key:, (*13)

$ bin/etcd-php etcd:rm /foo/bar

Delete an empty directory or a key-value pair, (*14)

$ bin/etcd-php etcd:rmdir /path/to/dir 

Recursively delete a key and all child keys:, (*15)

$ bin/etcd-php etcd:rmdir /path/to/dir --recursive

Watching for changes

Watch for only the next change on a key:, (*16)

$ bin/etcd-php etcd:watch /foo/bar

The Versions

24/07 2016

dev-master

9999999-dev http://www.github.com/linkorb/etcd-php

Etcd client library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

api php configuration etcd distributed

24/07 2016

v2.0.2

2.0.2.0 http://www.github.com/linkorb/etcd-php

Etcd client library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

api php configuration etcd distributed

24/07 2016

v2.0.1

2.0.1.0 http://www.github.com/linkorb/etcd-php

Etcd client library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

api php configuration etcd distributed

24/07 2016

v2.0.0

2.0.0.0 http://www.github.com/linkorb/etcd-php

Etcd client library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

api php configuration etcd distributed

20/07 2016

dev-fixed-ls

dev-fixed-ls http://www.github.com/linkorb/etcd-php

Etcd client library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

api php configuration etcd distributed

20/07 2016

dev-ls-fix-with-composer

dev-ls-fix-with-composer http://www.github.com/linkorb/etcd-php

Etcd client library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

api php configuration etcd distributed

20/07 2016

v1.2.1

1.2.1.0 http://www.github.com/linkorb/etcd-php

Etcd client library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

api php configuration etcd distributed

20/07 2016

dev-ls-fix

dev-ls-fix http://www.github.com/linkorb/etcd-php

Etcd client library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

api php configuration etcd distributed

01/02 2016

v1.2.0

1.2.0.0 http://www.github.com/linkorb/etcd-php

Etcd client library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

api php configuration etcd distributed

30/12 2015

v1.1.0

1.1.0.0 http://www.github.com/linkorb/etcd-php

Etcd client library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

api php configuration etcd distributed

11/02 2015

v1.0.0

1.0.0.0 http://www.github.com/linkorb/etcd-php

Etcd client library for PHP

  Sources   Download

MIT

The Requires

 

The Development Requires

api php configuration etcd distributed