1
0
mirror of synced 2024-11-05 02:59:16 +00:00
Tapeti/Tapeti.Flow/IFlowStore.cs

29 lines
706 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Tapeti.Flow
{
public interface IFlowStore
{
Task Load();
Task<Guid?> FindFlowStateID(Guid continuationID);
Task<IFlowStateLock> LockFlowState(Guid flowStateID);
}
public interface IFlowStateLock : IDisposable
{
Guid FlowStateID { get; }
Task<FlowState> GetFlowState();
Task StoreFlowState(FlowState flowState);
Task DeleteFlowState();
}
public class FlowState
{
public string Metadata { get; set; }
public string Data { get; set; }
public Dictionary<Guid, string> Continuations { get; set; }
}
}