class Cadence::Activity::AsyncToken

Constants

SEPARATOR

Attributes

activity_id[R]
domain[R]
run_id[R]
workflow_id[R]

Public Class Methods

decode(token) click to toggle source
# File lib/cadence/activity/async_token.rb, line 14
def self.decode(token)
  string = Base64.urlsafe_decode64(token)
  domain, activity_id, workflow_id, run_id = string.split(SEPARATOR)

  new(domain, activity_id, workflow_id, run_id)
end
encode(domain, activity_id, workflow_id, run_id) click to toggle source
# File lib/cadence/activity/async_token.rb, line 10
def self.encode(domain, activity_id, workflow_id, run_id)
  new(domain, activity_id, workflow_id, run_id).to_s
end
new(domain, activity_id, workflow_id, run_id) click to toggle source
# File lib/cadence/activity/async_token.rb, line 21
def initialize(domain, activity_id, workflow_id, run_id)
  @domain = domain
  @activity_id = activity_id
  @workflow_id = workflow_id
  @run_id = run_id
end

Public Instance Methods

to_s() click to toggle source
# File lib/cadence/activity/async_token.rb, line 28
def to_s
  parts = [domain, activity_id, workflow_id, run_id]
  Base64.urlsafe_encode64(parts.join(SEPARATOR)).freeze
end