github.com/mmatczuk/gohan@v0.0.0-20170206152520-30e45d9bdb69/examples/etcd_worker_example/README.md (about)

     1  etcd based worker example
     2  --------------------------
     3  
     4  In this example, we show how we can
     5  execute extension on etcd notification.
     6  
     7  You need configure watch keys and events in order to use this function.
     8  
     9  ``` yaml
    10  watch:
    11      keys:
    12        - config/v1.0/store/
    13      events:
    14        - config/v1.0/store/pets
    15      worker_count: 4
    16  
    17  etcd:
    18      - http://127.0.0.1:2379
    19  ```
    20  
    21  Then you can execute extension using sync:// + event path.
    22  
    23  ```
    24  extensions:
    25  - id: sync
    26    path: sync://config/v1.0/store/pets
    27    code_type: gohanscript
    28    code: |
    29      tasks:
    30      - debug:
    31  schemas: []
    32  ```