Class: Cadence::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/cadence/configuration.rb

Constant Summary collapse

DEFAULT_TIMEOUTS =
{
  execution: 60,          # End-to-end workflow time
  task: 10,               # Decision task processing time
  schedule_to_close: nil, # End-to-end activity time (default: schedule_to_start + start_to_close)
  schedule_to_start: 10,  # Queue time for an activity
  start_to_close: 30,     # Time spent processing an activity
  heartbeat: nil          # Max time between heartbeats (off by default)
}.freeze
DEFAULT_HEADERS =
{}.freeze
DEFAULT_DOMAIN =
'default-domain'.freeze
DEFAULT_TASK_LIST =
'default-task-list'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



22
23
24
25
26
27
28
29
30
# File 'lib/cadence/configuration.rb', line 22

def initialize
  @client_type = :thrift
  @logger = Logger.new(STDOUT, progname: 'cadence_client')
  @metrics_adapter = MetricsAdapters::Null.new
  @timeouts = DEFAULT_TIMEOUTS
  @domain = DEFAULT_DOMAIN
  @task_list = DEFAULT_TASK_LIST
  @headers = DEFAULT_HEADERS
end

Instance Attribute Details

#client_typeObject

Returns the value of attribute client_type.



7
8
9
# File 'lib/cadence/configuration.rb', line 7

def client_type
  @client_type
end

#domainObject

Returns the value of attribute domain.



7
8
9
# File 'lib/cadence/configuration.rb', line 7

def domain
  @domain
end

#headersObject

Returns the value of attribute headers.



7
8
9
# File 'lib/cadence/configuration.rb', line 7

def headers
  @headers
end

#hostObject

Returns the value of attribute host.



7
8
9
# File 'lib/cadence/configuration.rb', line 7

def host
  @host
end

#loggerObject

Returns the value of attribute logger.



7
8
9
# File 'lib/cadence/configuration.rb', line 7

def logger
  @logger
end

#metrics_adapterObject

Returns the value of attribute metrics_adapter.



7
8
9
# File 'lib/cadence/configuration.rb', line 7

def metrics_adapter
  @metrics_adapter
end

#portObject

Returns the value of attribute port.



7
8
9
# File 'lib/cadence/configuration.rb', line 7

def port
  @port
end

#task_listObject

Returns the value of attribute task_list.



7
8
9
# File 'lib/cadence/configuration.rb', line 7

def task_list
  @task_list
end

#timeoutsObject

Returns the value of attribute timeouts.



6
7
8
# File 'lib/cadence/configuration.rb', line 6

def timeouts
  @timeouts
end