Sha256: f27dc4ff1aa313c0f69445a35a0dc1fc42fdbd848caf8e64e555f46d29f1a42f

Contents?: true

Size: 886 Bytes

Versions: 7

Compression:

Stored size: 886 Bytes

Contents

require 'sub_zero'

Auditing = SubZero.client(:auditing)

# or

Auditing = SubZero.client :auditing do |c|
  c.timeout = 5000
  # what else? retry?
end

# fire and forget, just waits the Broker ACK to not care anymore, opens a thread
Auditing.log! author: 'Pedro Alvares Cabral', action: 'discovered Brazil.. heh.'

# waits for reply
ronconcon_logs = Auditing.index(author: 'Marques de Pombal')

# for more complex verbs, the base method call:

Auditing.call! 'bugs/report', error: 'error while trying to log'

Auditing.call 'stats/count'

Auditing.stats_count

# some sugar to sync call might be

Auditing['stats/count']


Auditing.stats! do |stats|
  DeveloperChatRoom.push "Availabilty: #{stats[:availability]}"
end


# reply:

# ACK:NOK { error: { message: '', code: '', … } } (BROKER)
# STATS/COUNT:OK
# STATS/COUNT:NOK { error: { message: '', code: '', … }}
# retry strategy

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sub_zero-0.0.9 example/auditing-client/run.rb
sub_zero-0.0.8 example/auditing-client/run.rb
sub_zero-0.0.7 example/auditing-client/run.rb
sub_zero-0.0.6 example/auditing-client/run.rb
sub_zero-0.0.5 example/auditing-client/run.rb
sub_zero-0.0.4 example/auditing-client/run.rb
sub_zero-0.0.3 example/auditing-client/run.rb