mirror of
https://github.com/valitydev/hellgate.git
synced 2024-11-06 02:45:20 +00:00
cfb0c20ec0
* switching to external pm * switched to party client for some tests (in hg_invoice_tests_SUITE); removed party_management tests * removed party_management, pm_proto, pm_client apps * fixed tests * replaced hg_client_party with party_client (part I, hg_invoice_template_tests_SUITE) * replaced hg_client_party with party_client (part II, hg_invoice_tests_SUITE) * fixed merging issues Co-authored-by: r.shaidullin <ndiezel0@gmail.com>
183 lines
5.8 KiB
Plaintext
183 lines
5.8 KiB
Plaintext
[
|
|
{kernel, [
|
|
{logger_sasl_compatible, false},
|
|
{logger_level, info},
|
|
{logger, [
|
|
{handler, default, logger_std_h, #{
|
|
level => error,
|
|
config => #{
|
|
type => standard_error
|
|
},
|
|
formatter => {logger_formatter, #{
|
|
depth => 30
|
|
}}
|
|
}},
|
|
{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
|
|
}
|
|
}
|
|
}},
|
|
{services, #{
|
|
automaton => "http://machinegun:8022/v1/automaton",
|
|
eventsink => "http://machinegun:8022/v1/event_sink",
|
|
accounter => "http://shumway:8022/shumpune",
|
|
party_management => "http://party-management:8022/v1/processing/partymgmt",
|
|
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"
|
|
}},
|
|
{proxy_opts, #{
|
|
transport_opts => #{
|
|
}
|
|
}},
|
|
{health_check, #{
|
|
disk => {erl_health, disk , ["/", 99]},
|
|
memory => {erl_health, cg_memory, [70]},
|
|
service => {erl_health, service , [<<"{{ service_name }}">>]},
|
|
dmt_client => {dmt_client, health_check, [<<"hellgate">>]}
|
|
}},
|
|
{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
|
|
}
|
|
}},
|
|
{binding, #{
|
|
max_sync_interval => <<"5s">>,
|
|
outdated_sync_interval => <<"1440m">>,
|
|
outdate_timeout => <<"180m">>
|
|
}}
|
|
]},
|
|
|
|
{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"
|
|
}},
|
|
{cache_options, #{ %% see `pm_party_cache:cache_options/0`
|
|
memory => 209715200, % 200Mb, cache memory quota in bytes
|
|
ttl => 3600,
|
|
size => 3000
|
|
}}
|
|
]},
|
|
|
|
{dmt_client, [
|
|
{cache_update_interval, 5000}, % milliseconds
|
|
{max_cache_size, #{
|
|
elements => 20,
|
|
memory => 52428800 % 50Mb
|
|
}},
|
|
{woody_event_handlers, [
|
|
{scoper_woody_event_handler, #{
|
|
event_handler_opts => #{
|
|
formatter_opts => #{
|
|
max_length => 1000
|
|
}
|
|
}
|
|
}}
|
|
]},
|
|
{service_urls, #{
|
|
'Repository' => <<"http://dominant:8022/v1/domain/repository">>,
|
|
'RepositoryClient' => <<"http://dominant:8022/v1/domain/repository_client">>
|
|
}}
|
|
]},
|
|
|
|
{party_client, [
|
|
{services, #{
|
|
party_management => "http://party-management:8022/v1/processing/partymgmt"
|
|
}},
|
|
{woody, #{
|
|
cache_mode => safe, % disabled | safe | aggressive
|
|
options => #{
|
|
woody_client => #{
|
|
event_handler => {scoper_woody_event_handler, #{
|
|
event_handler_opts => #{
|
|
formatter_opts => #{
|
|
max_length => 1000
|
|
}
|
|
}
|
|
}}
|
|
}
|
|
}
|
|
}}
|
|
]},
|
|
|
|
{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}
|
|
]},
|
|
|
|
{prometheus, [
|
|
{collectors, [default]}
|
|
]}
|
|
].
|