mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2025-08-16 12:31:43 +02:00
.config
.run
.workdir
Agent
Common
Controller
Docker
Utils
Phantom.Utils
Phantom.Utils.Actor
Event
Logging
Mailbox
Tasks
ActorConfiguration.cs
ActorExtensions.cs
ActorFactory.cs
ActorRef.cs
ActorSystemFactory.cs
ICanReply.cs
Phantom.Utils.Actor.csproj
Props.cs
ReceiveActor.cs
SupervisorStrategies.cs
Phantom.Utils.Events
Phantom.Utils.Logging
Phantom.Utils.Rpc
Phantom.Utils.Tests
Web
.dockerignore
.gitattributes
.gitignore
AddMigration.bat
AddMigration.sh
Directory.Build.props
Directory.Build.targets
Dockerfile
LICENSE
Packages.props
PhantomPanel.sln
README.md
global.json
32 lines
851 B
C#
32 lines
851 B
C#
using Akka.Actor;
|
|
using Akka.Configuration;
|
|
|
|
namespace Phantom.Utils.Actor;
|
|
|
|
public static class ActorSystemFactory {
|
|
private const string Configuration =
|
|
"""
|
|
akka {
|
|
actor {
|
|
default-dispatcher = {
|
|
executor = task-executor
|
|
}
|
|
internal-dispatcher = akka.actor.default-dispatcher
|
|
debug.unhandled = on
|
|
}
|
|
loggers = [
|
|
"Phantom.Utils.Actor.Logging.SerilogLogger, Phantom.Utils.Actor"
|
|
]
|
|
}
|
|
unbounded-jump-ahead-mailbox {
|
|
mailbox-type : "Phantom.Utils.Actor.Mailbox.UnboundedJumpAheadMailbox, Phantom.Utils.Actor"
|
|
}
|
|
""";
|
|
|
|
private static readonly BootstrapSetup Setup = BootstrapSetup.Create().WithConfig(ConfigurationFactory.ParseString(Configuration));
|
|
|
|
public static ActorSystem Create(string name) {
|
|
return ActorSystem.Create(name, Setup);
|
|
}
|
|
}
|