mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-13 10:48:26 -04:00
- NadekoBot class renamed to Bot
- 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
This commit is contained in:
20
src/NadekoBot.Coordinator/Program.cs
Normal file
20
src/NadekoBot.Coordinator/Program.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using NadekoBot.Coordinator;
|
||||
using NadekoBot.Core.Services;
|
||||
using Serilog;
|
||||
|
||||
// Additional configuration is required to successfully run gRPC on macOS.
|
||||
// For instructions on how to configure Kestrel and gRPC clients on macOS, visit https://go.microsoft.com/fwlink/?linkid=2099682
|
||||
static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||
Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
webBuilder.UseStartup<CoordStartup>();
|
||||
});
|
||||
|
||||
LogSetup.SetupLogger("coord");
|
||||
Log.Information("Starting coordinator... Pid: {ProcessId}", Environment.ProcessId);
|
||||
|
||||
CreateHostBuilder(args).Build().Run();
|
Reference in New Issue
Block a user