using ZB.MOM.WW.MxGateway.Contracts.Proto;

namespace ZB.MOM.WW.MxGateway.Server.Grpc;

/// <summary>
/// Streams MXAccess events to gRPC clients.
/// </summary>
public interface IEventStreamService
{
    /// <summary>
    /// Streams events for the specified session to the caller.
    /// </summary>
    /// <param name="request">Request payload.</param>
    /// <param name="cancellationToken">Token to cancel the asynchronous operation.</param>
    IAsyncEnumerable<MxEvent> StreamEventsAsync(
        StreamEventsRequest request,
        CancellationToken cancellationToken);
}
