Method: ConfigurationService::Client#publish_configuration
- Defined in:
- lib/configuration_service/client.rb
#publish_configuration(identifier: nil, data: nil, metadata: {}) ⇒ ConfigurationService::Configuration
Publishes configuration data and metadata
The metadata is decorated with the following keys:
-
“timestamp” - the current UTC time in ISO8601 format
-
“revision” - a UUID for this publication
Delegates the request to the configured provider. The provider may further decorate the metadata.
It is recommended that both the data and metadata dictionaries use strings as keys, and that values be limited to those that can be serialized to JSON.
73 74 75 76 77 78 79 80 81 |
# File 'lib/configuration_service/client.rb', line 73 def publish_configuration(identifier: nil, data: nil, metadata: {}) identifier = identifier_argument_or_instance_variable(identifier) Utils.dictionary?(data) or raise ConfigurationService::Error, "data must be a dictionary" Utils.dictionary?() or raise ConfigurationService::Error, "metadata must be a dictionary" = Utils.decorate() configuration = Configuration.new(identifier, data, ) @provider.publish_configuration(configuration, @credentials) end |