feat(scripting): ScriptLogTopicSink — script LogEvent → ScriptLogEntry → publisher
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user