2022-02-23 12:30:08 +00:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2022-02-24 14:15:39 +00:00
|
|
|
|
using ASC.Common;
|
2022-02-23 12:30:08 +00:00
|
|
|
|
using Microsoft.Extensions.Hosting;
|
|
|
|
|
|
2022-02-24 14:15:39 +00:00
|
|
|
|
namespace ASC.Core.Common.Hosting.Interfaces;
|
2022-02-23 12:30:08 +00:00
|
|
|
|
|
|
|
|
|
[Scope]
|
2022-02-24 14:15:39 +00:00
|
|
|
|
public interface IRegisterInstanceManager<T> where T : IHostedService
|
2022-02-23 12:30:08 +00:00
|
|
|
|
{
|
|
|
|
|
Task Register(string instanceId);
|
|
|
|
|
Task UnRegister(string instanceId);
|
|
|
|
|
Task<bool> IsActive(string instanceId);
|
|
|
|
|
Task<List<string>> DeleteOrphanInstances();
|
|
|
|
|
}
|