Class: Riak::Client::BeefcakeProtobuffsBackend::TimeSeriesPutOperator

Inherits:
Operator
  • Object
show all
Defined in:
lib/riak/client/beefcake/time_series_put_operator.rb

Instance Attribute Summary

Attributes inherited from Operator

#backend

Instance Method Summary collapse

Methods inherited from Operator

#initialize

Constructor Details

This class inherits a constructor from Riak::Client::BeefcakeProtobuffsBackend::Operator

Instance Method Details

#put(table_name, measurements) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/riak/client/beefcake/time_series_put_operator.rb', line 10

def put(table_name, measurements)
  rows = rows_for measurements

  request = TsPutReq.new table: table_name, rows: rows

  backend.protocol do |p|
    p.write :TsPutReq, request
    p.expect :TsPutResp, TsPutResp, empty_body_acceptable: true
  end
end