Module: Delphix::Utils

Included in:
Delphix, Client, Request
Defined in:
lib/delphix/utils.rb

Instance Method Summary collapse

Instance Method Details

#request_idString

Generates a uniq UUID, this is then used to identify this session.

Returns:

  • (String)

    Memoize a uniq UUID used to identify this session.



36
37
38
# File 'lib/delphix/utils.rb', line 36

def request_id
  @uuid ||= SecureRandom.uuid
end

#utc_httpdateDate, Time

Return the date and time in “HTTP-date” format as defined by RFC 7231.

Returns:

  • (Date, Time)

    in “HTTP-date” format



27
28
29
# File 'lib/delphix/utils.rb', line 27

def utc_httpdate
  Time.now.utc.httpdate
end