class Serfx::Response

Store agent rpc response data All RPC responses in Serf composed of an header and an optional body.

Constants

Header is composed of two sub-parts

  • Seq : an integer representing the original request

  • Error: a string that represent whether the request made, was successfull or no. For all successful RPC requests, Error should be an empty string

‘{“Seq”: 0, “Error”: “”}`

Attributes

body[R]
header[R]

Public Class Methods

new(header, body = nil) click to toggle source

Constructs a response object from a given header and body.

@param header [Hash] header of the response as hash @param body [Hash] body of the response as hash

# File lib/serfx/response.rb, line 24
def initialize(header, body = nil)
  @header = Header.new(header['Seq'], header['Error'])
  @body = body
end