Module: Juno + + + +
+-
+
- Defined in: +
- lib/juno/IO/constants.rb,
+ lib/juno/logger.rb,
lib/juno/version.rb,
lib/juno/Utils/utils.rb,
lib/juno/Config/config.rb,
lib/juno/server_status.rb,
lib/juno/IO/JunoMessage.rb,
lib/juno/Net/worker_pool.rb,
lib/juno/Net/io_processor.rb,
lib/juno/Net/ping_message.rb,
lib/juno/Config/properties.rb,
lib/juno/IO/ProtocolHeader.rb,
lib/juno/Net/request_queue.rb,
lib/juno/Client/cache_store.rb,
lib/juno/Client/sync_client.rb,
lib/juno/Net/base_processor.rb,
lib/juno/Net/client_handler.rb,
lib/juno/Utils/client_utils.rb,
lib/juno/Client/juno_request.rb,
lib/juno/Client/react_client.rb,
lib/juno/IO/OperationMessage.rb,
lib/juno/IO/PayloadComponent.rb,
lib/juno/Client/juno_response.rb,
lib/juno/Config/config_reader.rb,
lib/juno/IO/MetadataComponent.rb,
lib/juno/Client/operation_type.rb,
lib/juno/Client/record_context.rb,
lib/juno/Config/config_provider.rb,
lib/juno/Client/operation_status.rb,
lib/juno/Config/default_properties.rb,
lib/juno/IO/MetadataComponentTemplate.rb +
+
Overview
Top module for juno client
+ + +Defined Under Namespace
++ + + Modules: Client, ClientUtils, IO, Net + + + + Classes: Config, ConfigProvider, ConfigReader, DefaultProperties, Logger, Properties, ServerStatus, Utils + + +
+ + ++ Constant Summary + collapse +
+ +-
+
+
- VERSION = + + +
'0.1.0'
+
+
+ Class Method Summary + collapse +
+ +-
+
+
- + + + .configure ⇒ Object + + + + + + + + + + + + + + + + + + +
- + + + .juno_config ⇒ Object + + + + + + + + + + + + + + + + + + +
Class Method Details
+ + ++ + .configure ⇒ Object + + + + + +
+ + + +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122+ |
+
+ # File 'lib/juno/Config/config.rb', line 105 + +def self.configure + if @juno_config.nil? + config_reader = Juno::ConfigReader.new + yield config_reader + if !config_reader.file_path.nil? + @juno_config = Config.new(ConfigProvider.new(config_reader.file_path, config_reader.source_format, nil), + log_file: config_reader.log_file, ssl_cert_file: config_reader.ssl_cert_file, + ssl_key_file: config_reader.ssl_key_file) + @LOGGER = Juno::Logger.instance + elsif !config_reader.url.nil? # URL should URI Object + # @juno_config = Config.new(ConfigProvider.new(@juno_config.file_path, @juno_config.source_format, nil)) + else + raise 'No file or url provided' + end + else + Juno::Logger.instance.warn('Juno client cannot be reconfigured') + end +end+ |
+
+ + .juno_config ⇒ Object + + + + + +
+ + + +124 +125 +126 +127 +128+ |
+
+ # File 'lib/juno/Config/config.rb', line 124 + +def self.juno_config + raise 'Please configure the properties using Juno.configure' if @juno_config.nil? + + @juno_config +end+ |
+