23 lines
773 B
C#
23 lines
773 B
C#
using KLHZ.Trader.Core.Common.Messaging.Contracts.Messages;
|
|
using System.Threading.Channels;
|
|
|
|
namespace KLHZ.Trader.Core.Common.Messaging.Contracts
|
|
{
|
|
public interface IDataBus
|
|
{
|
|
public bool AddChannel(string key, Channel<INewPriceMessage> channel);
|
|
|
|
public bool AddChannel(string key, Channel<TradeCommand> channel);
|
|
public bool AddChannel(string key, Channel<INewCandle> channel);
|
|
|
|
public bool AddChannel(Channel<MessageForAdmin> channel);
|
|
|
|
public Task BroadcastNewPrice(INewPriceMessage newPriceMessage);
|
|
|
|
public Task BroadcastCommand(TradeCommand command);
|
|
|
|
public Task BroadcastCommand(MessageForAdmin command);
|
|
public Task BroadcastNewCandle(INewCandle command);
|
|
}
|
|
}
|