1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-11-24 07:05:37 +01:00
GiantsTools/Giants.Services/Store/IServerRegistryStore.cs

28 lines
886 B
C#
Raw Normal View History

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-10 07:11:10 +02:00
Task DeleteServer(string id, string partitionKey = null);
Task DeleteServers(IEnumerable<string> ids, string partitionKey = null);
Task<ServerInfo> GetServerInfo(string ipAddress);
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 UpsertServerInfo(ServerInfo serverInfo);
2020-08-09 01:31:16 +02:00
}
}