fistful-server/test/hellgate/sys.config

169 lines
5.3 KiB
Plaintext
Raw Normal View History

2019-10-10 13:56:46 +00:00
[
{kernel, [
{logger_sasl_compatible, false},
{logger_level, info},
2019-10-10 13:56:46 +00:00
{logger, [
{handler, default, logger_std_h, #{
level => error,
config => #{
type => standard_error
},
formatter =>
{logger_formatter, #{
depth => 30
}}
2019-10-10 13:56:46 +00:00
}},
{handler, console_logger, logger_std_h, #{
level => debug,
config => #{
type => {file, "/var/log/hellgate/console.json"},
sync_mode_qlen => 20
},
formatter => {logger_logstash_formatter, #{}}
}}
]}
]},
{scoper, [
{storage, scoper_storage_logger}
]},
{hellgate, [
{ip, "::"},
{port, 8022},
{default_woody_handling_timeout, 30000},
%% 1 sec above cowboy's request_timeout
{shutdown_timeout, 7000},
{protocol_opts, #{
% Bump keepalive timeout up to a minute
request_timeout => 6000,
% Should be greater than any other timeouts
idle_timeout => infinity
}},
{scoper_event_handler_options, #{
event_handler_opts => #{
formatter_opts => #{
max_length => 1000
}
}
}},
2019-10-10 13:56:46 +00:00
{services, #{
automaton => "http://machinegun:8022/v1/automaton",
eventsink => "http://machinegun:8022/v1/event_sink",
accounter => "http://shumway:8022/shumpune",
party_management => "http://hellgate:8022/v1/processing/partymgmt",
2019-10-10 13:56:46 +00:00
customer_management => "http://hellgate:8022/v1/processing/customer_management",
% TODO make more consistent
recurrent_paytool => "http://hellgate:8022/v1/processing/recpaytool",
fault_detector => "http://fault-detector:8022/v1/fault-detector"
2019-10-10 13:56:46 +00:00
}},
{proxy_opts, #{
transport_opts => #{}
2019-10-10 13:56:46 +00:00
}},
2020-12-29 14:16:07 +00:00
{health_check, #{
disk => {erl_health, disk, ["/", 99]},
memory => {erl_health, cg_memory, [99]},
service => {erl_health, service, [<<"hellgate">>]}
2020-12-29 14:16:07 +00:00
}},
2019-10-10 13:56:46 +00:00
{payment_retry_policy, #{
processed => {exponential, {max_total_timeout, 30}, 2, 1},
captured => no_retry,
refunded => no_retry
}},
{inspect_timeout, 3000},
{fault_detector, #{
enabled => true,
timeout => 4000,
availability => #{
critical_fail_rate => 0.7,
sliding_window => 60000,
operation_time_limit => 10000,
pre_aggregation_size => 2
},
conversion => #{
benign_failures => [
insufficient_funds,
rejected_by_issuer,
processing_deadline_reached
],
critical_fail_rate => 0.7,
sliding_window => 60000,
operation_time_limit => 1200000,
pre_aggregation_size => 2
}
2019-10-10 13:56:46 +00:00
}}
]},
{party_management, [
{scoper_event_handler_options, #{
event_handler_opts => #{
formatter_opts => #{
max_length => 1000
}
}
}},
{services, #{
automaton => "http://machinegun:8022/v1/automaton",
accounter => "http://shumway:8022/shumpune"
}}
]},
2019-10-10 13:56:46 +00:00
{dmt_client, [
{cache_update_interval, 500}, % milliseconds
2019-10-10 13:56:46 +00:00
{max_cache_size, #{
elements => 20,
memory => 52428800 % 50Mb
2019-10-10 13:56:46 +00:00
}},
{woody_event_handlers, [
{scoper_woody_event_handler, #{
event_handler_opts => #{
formatter_opts => #{
max_length => 1000
}
}
}}
]},
2019-10-10 13:56:46 +00:00
{service_urls, #{
'Repository' => <<"http://dominant:8022/v1/domain/repository">>,
2019-10-10 13:56:46 +00:00
'RepositoryClient' => <<"http://dominant:8022/v1/domain/repository_client">>
}}
]},
{party_client, [
{services, #{
party_management => "http://hellgate:8022/v1/processing/partymgmt"
}},
{woody, #{
% disabled | safe | aggressive
cache_mode => safe,
2019-10-10 13:56:46 +00:00
options => #{
woody_client => #{
event_handler =>
{scoper_woody_event_handler, #{
event_handler_opts => #{
formatter_opts => #{
max_length => 1000
}
}
}}
2019-10-10 13:56:46 +00:00
}
}
}}
]},
{how_are_you, [
{metrics_publishers, [
% {hay_statsd_publisher, #{
% key_prefix => <<"hellgate.">>,
% host => "localhost",
% port => 8125
% }}
]}
]},
{snowflake, [
{max_backward_clock_moving, 1000}, % 1 second
{machine_id, hostname_hash}
2019-10-10 13:56:46 +00:00
]}
].