// ========================================================================== // Squidex Headless CMS // ========================================================================== // Copyright (c) Squidex UG (haftungsbeschränkt) // All rights reserved. Licensed under the MIT license. // ========================================================================== using System; using System.Threading.Tasks; using Orleans.Concurrency; using Squidex.Infrastructure.Orleans; namespace Squidex.Infrastructure.EventSourcing.Grains { public interface IEventConsumerGrain : IBackgroundGrain { Task> GetStateAsync(); Task> StopAsync(); Task> StartAsync(); Task> ResetAsync(); Task OnEventAsync(Immutable subscription, Immutable storedEvent); Task OnErrorAsync(Immutable subscription, Immutable exception); } }