feat(scripting): ScriptLogTopicSink — script LogEvent → ScriptLogEntry → publisher

This commit is contained in:
Joseph Doherty
2026-06-10 11:38:54 -04:00
parent 12423899aa
commit 14fe88fc80
5 changed files with 292 additions and 0 deletions
@@ -0,0 +1,19 @@
using ZB.MOM.WW.OtOpcUa.Commons.Messages.Logging;
namespace ZB.MOM.WW.OtOpcUa.Core.Scripting;
/// <summary>
/// Abstraction over the mechanism that publishes <see cref="ScriptLogEntry"/> records
/// to a downstream consumer (e.g. an Akka DPS <c>script-logs</c> topic). Implemented by
/// the concrete DPS publisher in a later task; the sink depends only on this interface
/// so the Core.Scripting layer has no Akka dependency.
/// </summary>
public interface IScriptLogPublisher
{
/// <summary>
/// Publish a single <see cref="ScriptLogEntry"/>. Implementations must be
/// thread-safe — Serilog sinks may be called from any thread.
/// </summary>
/// <param name="entry">The entry to publish. Must not be <c>null</c>.</param>
void Publish(ScriptLogEntry entry);
}