2023-09-12 13:32:06 +02:00
|
|
|
|
namespace Core
|
2023-04-12 16:06:04 +02:00
|
|
|
|
{
|
|
|
|
|
public interface ITimeSet
|
|
|
|
|
{
|
|
|
|
|
TimeSpan HttpCallTimeout();
|
2023-07-17 15:21:10 +02:00
|
|
|
|
TimeSpan HttpCallRetryTime();
|
2023-05-10 09:55:36 +02:00
|
|
|
|
TimeSpan HttpCallRetryDelay();
|
2023-04-12 16:06:04 +02:00
|
|
|
|
TimeSpan WaitForK8sServiceDelay();
|
|
|
|
|
TimeSpan K8sOperationTimeout();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class DefaultTimeSet : ITimeSet
|
|
|
|
|
{
|
|
|
|
|
public TimeSpan HttpCallTimeout()
|
|
|
|
|
{
|
2023-08-16 10:52:44 +02:00
|
|
|
|
return TimeSpan.FromMinutes(5);
|
2023-04-12 16:06:04 +02:00
|
|
|
|
}
|
|
|
|
|
|
2023-07-17 15:21:10 +02:00
|
|
|
|
public TimeSpan HttpCallRetryTime()
|
2023-04-12 16:06:04 +02:00
|
|
|
|
{
|
2023-05-11 12:44:53 +02:00
|
|
|
|
return TimeSpan.FromMinutes(1);
|
2023-04-12 16:06:04 +02:00
|
|
|
|
}
|
|
|
|
|
|
2023-05-10 09:55:36 +02:00
|
|
|
|
public TimeSpan HttpCallRetryDelay()
|
2023-04-12 16:06:04 +02:00
|
|
|
|
{
|
2023-06-08 13:23:26 +02:00
|
|
|
|
return TimeSpan.FromSeconds(1);
|
2023-04-12 16:06:04 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public TimeSpan WaitForK8sServiceDelay()
|
|
|
|
|
{
|
2023-08-16 10:52:44 +02:00
|
|
|
|
return TimeSpan.FromSeconds(10);
|
2023-04-12 16:06:04 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public TimeSpan K8sOperationTimeout()
|
|
|
|
|
{
|
2023-08-16 10:52:44 +02:00
|
|
|
|
return TimeSpan.FromMinutes(30);
|
2023-04-12 16:06:04 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|