Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 1.02 KB

README.md

File metadata and controls

48 lines (36 loc) · 1.02 KB

Overview

This bundle is a bridge between Symfony2 configuration and consul-php-sdk library.

Installation

Download the dependency via composer

composer require jcart/consul-api-client-bundle

Install the bundle into your AppKernel. Add the following line to the bundle defintions:

new JC\ConsulApiClientBundle\JCConsulApiClientBundle(),

Configuration

The configuration supports a list of consul clients.

jc_consul_api_client:
    clients:
        primary:
            host: consul.dev
            port: 8500
            logger: logger
            secret: your_secret_consul_key

Usage

For each client configuration defined, the bundle will register the container the following services for each client

jc_consul_api_client.kv.%s
jc_consul_api_client.agent.%s
jc_consul_api_client.health.%s
jc_consul_api_client.catalog.%s
jc_consul_api_client.kv.%s
jc_consul_api_client.session.%s