Module: StatsCloud
- Extended by:
- LoggerHelper
- Defined in:
- lib/statscloud.rb,
lib/statscloud/version.rb,
lib/statscloud/cluster_client.rb,
lib/statscloud/statscloud_client.rb,
lib/statscloud/statsmeter_client.rb,
lib/statscloud/errors/client_error.rb,
lib/statscloud/helpers/event_helper.rb,
lib/statscloud/helpers/assets_helper.rb,
lib/statscloud/helpers/logger_helper.rb,
lib/statscloud/helpers/plugins_helper.rb,
lib/statscloud/helpers/socketio_helper.rb,
lib/statscloud/helpers/statscloud_helper.rb,
lib/statscloud/helpers/statsmeter_helper.rb,
lib/generators/stats_cloud/install_generator.rb,
lib/statscloud/helpers/parsed_response_helper.rb
Overview
StatsCloud.io ruby client
Defined Under Namespace
Modules: AssetsHelper, EventHelper, LoggerHelper, PluginsHelper, SocketIOHelper, StatsCloudHelper, StatsmeterHelper Classes: Client, ClusterClient, InstallGenerator, ParsedResponseHelper, StatsmeterClient
Constant Summary collapse
- VERSION =
version of statscloud-ruby-client.
Type: String
"1.0.6"- ClientError =
Class.new(StandardError)
Class Method Summary collapse
-
.cluster_status ⇒ Hash
Returns cluster status.
-
.meter ⇒ StatsCloud::StatsmeterClient
Returns statscloud.io client aka Statsmeter client.
-
.record_event(name, measurement = 0) ⇒ Object
Records a single event.
-
.record_events(*events) ⇒ Object
Records several events at once.
-
.record_events_array(events) ⇒ Object
Records an array of events at once.
-
.start(base_config = nil) ⇒ Thread
Configures statsmeter.io support for application and initializes a statscloud.io client.
-
.stop ⇒ NilClass
Stops statscloud.io service.
-
.with_environment(env) ⇒ Object
Configures Statscloud environment.
-
.with_tags(tags) ⇒ Object
Configures Statscloud tags.
Methods included from LoggerHelper
Class Method Details
.cluster_status ⇒ Hash
Returns cluster status.
88 89 90 91 92 |
# File 'lib/statscloud.rb', line 88 def cluster_status stats_cloud_instance.cluster_status rescue StandardError => error logger.error error end |
.meter ⇒ StatsCloud::StatsmeterClient
Returns statscloud.io client aka Statsmeter client
51 52 53 54 55 |
# File 'lib/statscloud.rb', line 51 def meter stats_cloud_instance.meter rescue StandardError => error logger.error error end |
.record_event(name, measurement = 0) ⇒ Object
Records a single event.
63 64 65 |
# File 'lib/statscloud.rb', line 63 def record_event(name, measurement = 0) stats_cloud_instance.record_event(name, measurement) end |
.record_events(*events) ⇒ Object
Records several events at once.
71 72 73 |
# File 'lib/statscloud.rb', line 71 def record_events(*events) stats_cloud_instance.record_events(*events) end |
.record_events_array(events) ⇒ Object
Records an array of events at once.
79 80 81 |
# File 'lib/statscloud.rb', line 79 def record_events_array(events) stats_cloud_instance.record_events_array(events) end |
.start(base_config = nil) ⇒ Thread
Configures statsmeter.io support for application and initializes a statscloud.io client.
22 23 24 25 26 |
# File 'lib/statscloud.rb', line 22 def start(base_config = nil) stats_cloud_instance.start(base_config) rescue StandardError => error logger.error error end |
.stop ⇒ NilClass
Stops statscloud.io service.
99 100 101 102 103 |
# File 'lib/statscloud.rb', line 99 def stop stats_cloud_instance.stop rescue StandardError => error logger.error error end |
.with_environment(env) ⇒ Object
Configures Statscloud environment.
31 32 33 34 35 |
# File 'lib/statscloud.rb', line 31 def with_environment(env) stats_cloud_instance.with_environment(env) rescue StandardError => error logger.error error end |
.with_tags(tags) ⇒ Object
Configures Statscloud tags.
40 41 42 43 44 |
# File 'lib/statscloud.rb', line 40 def () stats_cloud_instance.() rescue StandardError => error logger.error error end |