@@ -1,39 +0,0 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
using System.Linq; | |||||
using Cap.Consistency.Consumer; | |||||
using Microsoft.Extensions.DependencyInjection; | |||||
using System.Threading.Tasks; | |||||
namespace Cap.Consistency | |||||
{ | |||||
public class KafkaConsistency : IRoute | |||||
{ | |||||
private IServiceProvider _serviceProvider; | |||||
private IEnumerable<IConsumerHandler> _handlers; | |||||
public KafkaConsistency(IServiceProvider serviceProvider) { | |||||
_serviceProvider = serviceProvider; | |||||
} | |||||
public void Start() { | |||||
_handlers = _serviceProvider.GetServices<IConsumerHandler>(); | |||||
var services = _serviceProvider.GetServices<IConsumerService>(); | |||||
foreach (var handler in _handlers) { | |||||
handler.Start(services); | |||||
} | |||||
} | |||||
public void Stop() { | |||||
foreach (var handler in _handlers) { | |||||
handler.Stop(); | |||||
} | |||||
} | |||||
public async Task Start() { | |||||
} | |||||
} | |||||
} |
@@ -1,12 +0,0 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace Cap.Consistency.Models | |||||
{ | |||||
public interface IConsumerModel | |||||
{ | |||||
string TopicName { get; set; } | |||||
} | |||||
} |
@@ -1,41 +0,0 @@ | |||||
using System; | |||||
using System.Collections; | |||||
using System.Collections.Generic; | |||||
using Cap.Consistency.Abstractions; | |||||
namespace Cap.Consistency | |||||
{ | |||||
public class RouteTable : IReadOnlyList<ConsumerExecutorDescriptor> | |||||
{ | |||||
public RouteTable() { | |||||
} | |||||
public RouteTable(List<ConsumerExecutorDescriptor> messageMethods) { | |||||
QMessageMethods = messageMethods; | |||||
} | |||||
public ConsumerExecutorDescriptor this[int index] { | |||||
get { | |||||
throw new NotImplementedException(); | |||||
} | |||||
} | |||||
public int Count { | |||||
get { | |||||
throw new NotImplementedException(); | |||||
} | |||||
} | |||||
public List<ConsumerExecutorDescriptor> QMessageMethods { get; set; } | |||||
public IEnumerator<ConsumerExecutorDescriptor> GetEnumerator() { | |||||
throw new NotImplementedException(); | |||||
} | |||||
IEnumerator IEnumerable.GetEnumerator() { | |||||
throw new NotImplementedException(); | |||||
} | |||||
} | |||||
} |