Class: Vayacondios

Inherits:
Object
  • Object
show all
Extended by:
Notifications
Defined in:
lib/vayacondios/server/handlers/event_handler.rb,
lib/vayacondios/version.rb,
lib/vayacondios/legacy_switch.rb,
lib/vayacondios/client/itemset.rb,
lib/vayacondios/client/notifier.rb,
lib/vayacondios/server/rack/path.rb,
lib/vayacondios/client/configliere.rb,
lib/vayacondios/client/cube_client.rb,
lib/vayacondios/client/http_client.rb,
lib/vayacondios/server/rack/params.rb,
lib/vayacondios/server/rack/jsonize.rb,
lib/vayacondios/client/legacy_switch.rb,
lib/vayacondios/client/zabbix_client.rb,
lib/vayacondios/server/legacy_switch.rb,
lib/vayacondios/server/errors/not_found.rb,
lib/vayacondios/server/errors/bad_request.rb,
lib/vayacondios/server/rack/extract_methods.rb,
lib/vayacondios/server/rack/path_validation.rb,
lib/vayacondios/server/handlers/config_handler.rb,
lib/vayacondios/server/handlers/itemset_handler.rb

Overview

Vayacondios::ItemsetHandler

This handler will accept requests to handle arrays for an organization. These arrays can only contain numbers and strings. GET requests are idempotent POST requests are forbidden PUT requests will clobber an existing array DELETE requests require an array of objects to remove

Direct Known Subclasses

Notifier

Defined Under Namespace

Modules: Configliere, Error, Notifications, Rack Classes: Client, ConfigDocument, ConfigHandler, CubeClient, CubeNotifier, Document, EventDocument, EventHandler, HttpClient, HttpNotifier, ItemsetDocument, ItemsetHandler, LegacyContentsHandler, LogNotifier, Notifier, NotifierFactory, NullNotifier, StandardContentsHandler, ZabbixClient, ZabbixNotifier

Constant Summary collapse

VERSION =
'0.2.10'
@@legacy_switch =
nil

Class Method Summary collapse

Methods included from Notifications

included, notify

Class Method Details

.default_notifier(log = nil) ⇒ Object



95
# File 'lib/vayacondios/client/notifier.rb', line 95

def self.default_notifier(log = nil) NotifierFactory.receive(type: 'log', log: log) ; end

.force_legacy_mode(on) ⇒ Object



32
33
34
35
# File 'lib/vayacondios/legacy_switch.rb', line 32

def self.force_legacy_mode on
  Log.info("forcing #{on ? 'legacy' : 'standard'} mode")
  @@legacy_switch = get_legacy_switch on
end

.legacy_switchObject



23
24
25
26
27
28
29
30
# File 'lib/vayacondios/legacy_switch.rb', line 23

def self.legacy_switch
  if @@legacy_switch.nil?
    legacy_mode_on = Settings[:vayacondios][:legacy]
    @@legacy_switch = get_legacy_switch(legacy_mode_on)
    Log.info("using #{legacy_mode_on ? 'legacy' : 'standard'} mode")
  end
  @@legacy_switch
end