2020-08-09 01:31:16 +02:00
|
|
|
|
namespace Giants.Services
|
|
|
|
|
{
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq.Expressions;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
public interface IServerRegistryStore
|
|
|
|
|
{
|
2020-08-10 07:11:10 +02:00
|
|
|
|
Task DeleteServer(string id, string partitionKey = null);
|
|
|
|
|
|
|
|
|
|
Task DeleteServers(IEnumerable<string> ids, string partitionKey = null);
|
|
|
|
|
|
2020-08-16 10:47:25 +02:00
|
|
|
|
Task<IEnumerable<ServerInfo>> GetServerInfos(Expression<Func<ServerInfo, bool>> whereExpression = null, bool includeExpired = false, string partitionKey = null);
|
2020-08-09 01:31:16 +02:00
|
|
|
|
|
2020-08-09 02:26:41 +02:00
|
|
|
|
Task<IEnumerable<TSelect>> GetServerInfos<TSelect>(
|
|
|
|
|
Expression<Func<ServerInfo, TSelect>> selectExpression,
|
2020-08-16 10:47:25 +02:00
|
|
|
|
bool includeExpired = false,
|
2020-08-09 02:26:41 +02:00
|
|
|
|
Expression<Func<ServerInfo, bool>> whereExpression = null,
|
|
|
|
|
string partitionKey = null);
|
2020-08-09 01:31:16 +02:00
|
|
|
|
|
2020-08-09 02:26:41 +02:00
|
|
|
|
Task UpsertServerInfo(ServerInfo serverInfo);
|
2020-08-09 01:31:16 +02:00
|
|
|
|
}
|
|
|
|
|
}
|