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-09 02:26:41 +02:00
|
|
|
|
Task Initialize();
|
2020-08-09 01:31:16 +02:00
|
|
|
|
|
2020-08-09 02:26:41 +02:00
|
|
|
|
Task<IEnumerable<ServerInfo>> GetServerInfos(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<IEnumerable<TSelect>> GetServerInfos<TSelect>(
|
|
|
|
|
Expression<Func<ServerInfo, TSelect>> selectExpression,
|
|
|
|
|
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<ServerInfo> GetServerInfo(string ipAddress);
|
|
|
|
|
|
|
|
|
|
Task UpsertServerInfo(ServerInfo serverInfo);
|
|
|
|
|
|
|
|
|
|
Task DeleteServers(IEnumerable<string> ids, string partitionKey = null);
|
2020-08-09 01:31:16 +02:00
|
|
|
|
}
|
|
|
|
|
}
|