# Class: ConfigRetriever

## vertx-config-js/config_retriever~ ConfigRetriever

#### new ConfigRetriever()

Defines a configuration retriever that read configuration from

Source:
  - vertx-config-js/config_retriever.js, line 33

### Methods

#### close()

Closes the retriever.

Source:
  - vertx-config-js/config_retriever.js, line 64

#### configStream() → {ReadStream}

Source:
  - vertx-config-js/config_retriever.js, line 107

##### Returns:

the stream of configurations. It's single stream (unicast) and that delivers the last known config and the successors periodically.

Type
  ReadStream

#### getCachedConfig() → {Object}

Gets the last computed configuration.

Source:
  - vertx-config-js/config_retriever.js, line 78

##### Returns:

the last configuration

Type
  Object

#### getConfig(completionHandler)

Reads the configuration from the different and computes the final configuration.

##### Parameters:

Name | Type | Description
--- | --- | ---
`completionHandler` | function | handler receiving the computed configuration, or a failure if the configuration cannot be retrieved

Source:
  - vertx-config-js/config_retriever.js, line 45

#### listen(listener)

Registers a listener receiving configuration changes. This method cannot only be called if the configuration is broadcasted.

##### Parameters:

Name | Type | Description
--- | --- | ---
`listener` | function | the listener

Source:
  - vertx-config-js/config_retriever.js, line 92