audit, advisories and doctors/setup work
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using StellaOps.Determinism;
|
||||
|
||||
namespace StellaOps.Provcache.Events;
|
||||
|
||||
/// <summary>
|
||||
@@ -91,6 +93,8 @@ public sealed record FeedEpochAdvancedEvent
|
||||
/// <param name="correlationId">Correlation ID for tracing.</param>
|
||||
/// <param name="eventId">Optional event ID (defaults to new GUID).</param>
|
||||
/// <param name="timestamp">Optional timestamp (defaults to current UTC time).</param>
|
||||
/// <param name="guidProvider">Optional GUID provider for deterministic IDs.</param>
|
||||
/// <param name="timeProvider">Optional time provider for deterministic timestamps.</param>
|
||||
public static FeedEpochAdvancedEvent Create(
|
||||
string feedId,
|
||||
string previousEpoch,
|
||||
@@ -102,12 +106,17 @@ public sealed record FeedEpochAdvancedEvent
|
||||
string? tenantId = null,
|
||||
string? correlationId = null,
|
||||
Guid? eventId = null,
|
||||
DateTimeOffset? timestamp = null)
|
||||
DateTimeOffset? timestamp = null,
|
||||
IGuidProvider? guidProvider = null,
|
||||
TimeProvider? timeProvider = null)
|
||||
{
|
||||
var guidSource = guidProvider ?? SystemGuidProvider.Instance;
|
||||
var timeSource = timeProvider ?? TimeProvider.System;
|
||||
|
||||
return new FeedEpochAdvancedEvent
|
||||
{
|
||||
EventId = eventId ?? Guid.NewGuid(),
|
||||
Timestamp = timestamp ?? DateTimeOffset.UtcNow,
|
||||
EventId = eventId ?? guidSource.NewGuid(),
|
||||
Timestamp = timestamp ?? timeSource.GetUtcNow(),
|
||||
FeedId = feedId,
|
||||
PreviousEpoch = previousEpoch,
|
||||
NewEpoch = newEpoch,
|
||||
|
||||
Reference in New Issue
Block a user