mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-12 02:08:27 -04:00
- Implemented grpc based coordinator. Supports restarting, killing single or all shards, as well as getting current shard statuses. (Adaptation of the one used by the public bot) - Coord is setup via coord.yml file - Methods from SelfService which deal with shard/bot restart etc have been moved to ICoordinator (with GrpcRemoteCoordinator being the default implementation atm) - Vastly simplified NadekoBot/Program.cs
21 lines
732 B
C#
21 lines
732 B
C#
namespace NadekoBot.Coordinator
|
|
{
|
|
public readonly struct Config
|
|
{
|
|
public int TotalShards { get; init; }
|
|
public int RecheckIntervalMs { get; init; }
|
|
public string ShardStartCommand { get; init; }
|
|
public string ShardStartArgs { get; init; }
|
|
public double UnresponsiveSec { get; init; }
|
|
|
|
public Config(int totalShards, int recheckIntervalMs, string shardStartCommand, string shardStartArgs, double unresponsiveSec)
|
|
{
|
|
TotalShards = totalShards;
|
|
RecheckIntervalMs = recheckIntervalMs;
|
|
ShardStartCommand = shardStartCommand;
|
|
ShardStartArgs = shardStartArgs;
|
|
UnresponsiveSec = unresponsiveSec;
|
|
}
|
|
|
|
}
|
|
} |