* init leader leaderelection * fix format * remove unused import * add config map * fix space * add multi lock * lease lock * cp case LeaderElection * more test cases * port all testcases from java * fix space * fix default timeout * try to fix flasky gh action by reducing renew deadline * try debug failed gh action
21 lines
474 B
C#
21 lines
474 B
C#
using System;
|
|
|
|
namespace k8s.LeaderElection
|
|
{
|
|
public class LeaderElectionConfig
|
|
{
|
|
public ILock Lock { get; set; }
|
|
|
|
public TimeSpan LeaseDuration { get; set; } = TimeSpan.FromSeconds(15);
|
|
|
|
public TimeSpan RenewDeadline { get; set; } = TimeSpan.FromSeconds(10);
|
|
|
|
public TimeSpan RetryPeriod { get; set; } = TimeSpan.FromSeconds(2);
|
|
|
|
public LeaderElectionConfig(ILock @lock)
|
|
{
|
|
Lock = @lock;
|
|
}
|
|
}
|
|
}
|