2017-01-31 11:01:08 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Tapeti.Flow
|
|
|
|
|
{
|
2017-07-27 13:55:37 +00:00
|
|
|
|
public interface IFlowRepository<T>
|
2017-01-31 11:01:08 +00:00
|
|
|
|
{
|
2017-07-27 13:55:37 +00:00
|
|
|
|
Task<List<KeyValuePair<Guid, T>>> GetStates();
|
|
|
|
|
Task CreateState(Guid flowID, T state, DateTime timestamp);
|
|
|
|
|
Task UpdateState(Guid flowID, T state);
|
2017-01-31 11:01:08 +00:00
|
|
|
|
Task DeleteState(Guid flowID);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class FlowStateRecord
|
|
|
|
|
{
|
|
|
|
|
public Guid FlowID;
|
|
|
|
|
public string Metadata;
|
|
|
|
|
public string Data;
|
2017-02-05 22:22:34 +00:00
|
|
|
|
public Dictionary<Guid, string> ContinuationMetadata;
|
2017-01-31 11:01:08 +00:00
|
|
|
|
}
|
|
|
|
|
}
|