Documentation ¶
Index ¶
- type Connection
- func (c *Connection) Consume(ch *amqp.Channel, q *amqp.Queue) (<-chan amqp.Delivery, error)
- func (c *Connection) ConsumeAfterAck(ch *amqp.Channel, q *amqp.Queue) (<-chan amqp.Delivery, error)
- func (c *Connection) DeclareQueue(ch *amqp.Channel, name string) error
- func (c *Connection) DeclareThrottledQueue(ch *amqp.Channel, name string) error
- func (c *Connection) GetChannel(id string) *amqp.Channel
- func (c *Connection) GetQueue(ch *amqp.Channel, queue string) *amqp.Queue
- func (c *Connection) NewConnection(address string) *amqp.Connection
- func (c *Connection) Publish(ch *amqp.Channel, q *amqp.Queue, bytes []byte) error
- func (c *Connection) PublishCancelOrderMessage(o *types.Order) error
- func (c *Connection) PublishCancelStopOrderMessage(so *types.StopOrder) error
- func (c *Connection) PublishDepositTransaction(transaction *types.DepositTransaction) error
- func (c *Connection) PublishEngineResponse(res *types.EngineResponse) error
- func (c *Connection) PublishMessage(res *types.EngineResponse, queue string) error
- func (c *Connection) PublishNewOrderMessage(o *types.Order) error
- func (c *Connection) PublishNewStopOrderMessage(so *types.StopOrder) error
- func (c *Connection) PublishOrder(order *Message) error
- func (c *Connection) PublishOrderResponse(res *types.EngineResponse) error
- func (c *Connection) PublishTradeResponse(res *types.EngineResponse) error
- func (c *Connection) Purge(ch *amqp.Channel, name string) error
- func (c *Connection) QueuePoolDepositTransactions() (<-chan *types.DepositTransaction, error)
- func (c *Connection) SubscribeEngineResponses(fn func(*types.EngineResponse) error) error
- func (c *Connection) SubscribeOrderResponses(fn func(*types.EngineResponse) error) error
- func (c *Connection) SubscribeOrders(fn func(*Message) error) error
- func (c *Connection) SubscribeQueue(fn func(*types.EngineResponse) error, queue string) error
- func (c *Connection) SubscribeTradeResponses(fn func(*types.EngineResponse) error) error
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
Conn *amqp.Connection
}
func InitConnection ¶
func InitConnection(address string) *Connection
InitConnection Initializes single rabbitmq connection for whole system
func (*Connection) ConsumeAfterAck ¶
func (*Connection) DeclareQueue ¶
func (c *Connection) DeclareQueue(ch *amqp.Channel, name string) error
func (*Connection) DeclareThrottledQueue ¶
func (c *Connection) DeclareThrottledQueue(ch *amqp.Channel, name string) error
func (*Connection) GetChannel ¶
func (c *Connection) GetChannel(id string) *amqp.Channel
func (*Connection) NewConnection ¶
func (c *Connection) NewConnection(address string) *amqp.Connection
func (*Connection) PublishCancelOrderMessage ¶
func (c *Connection) PublishCancelOrderMessage(o *types.Order) error
func (*Connection) PublishCancelStopOrderMessage ¶
func (c *Connection) PublishCancelStopOrderMessage(so *types.StopOrder) error
func (*Connection) PublishDepositTransaction ¶
func (c *Connection) PublishDepositTransaction(transaction *types.DepositTransaction) error
func (*Connection) PublishEngineResponse ¶
func (c *Connection) PublishEngineResponse(res *types.EngineResponse) error
PublishEngineResponse publish engine response to queue
func (*Connection) PublishMessage ¶
func (c *Connection) PublishMessage(res *types.EngineResponse, queue string) error
PublishMessage publish message to rabbitmq
func (*Connection) PublishNewOrderMessage ¶
func (c *Connection) PublishNewOrderMessage(o *types.Order) error
func (*Connection) PublishNewStopOrderMessage ¶
func (c *Connection) PublishNewStopOrderMessage(so *types.StopOrder) error
func (*Connection) PublishOrder ¶
func (c *Connection) PublishOrder(order *Message) error
func (*Connection) PublishOrderResponse ¶
func (c *Connection) PublishOrderResponse(res *types.EngineResponse) error
PublishOrderResponse publish order response to queue
func (*Connection) PublishTradeResponse ¶
func (c *Connection) PublishTradeResponse(res *types.EngineResponse) error
PublishTradeResponse publish trade response to queue
func (*Connection) QueuePoolDepositTransactions ¶
func (c *Connection) QueuePoolDepositTransactions() (<-chan *types.DepositTransaction, error)
QueuePoolDepositTransactions : return a queue as a channel
func (*Connection) SubscribeEngineResponses ¶
func (c *Connection) SubscribeEngineResponses(fn func(*types.EngineResponse) error) error
SubscribeEngineResponses subscribe engine responses
func (*Connection) SubscribeOrderResponses ¶
func (c *Connection) SubscribeOrderResponses(fn func(*types.EngineResponse) error) error
SubscribeOrderResponses subscribe order responses
func (*Connection) SubscribeOrders ¶
func (c *Connection) SubscribeOrders(fn func(*Message) error) error
func (*Connection) SubscribeQueue ¶
func (c *Connection) SubscribeQueue(fn func(*types.EngineResponse) error, queue string) error
SubscribeQueue subscribe queue
func (*Connection) SubscribeTradeResponses ¶
func (c *Connection) SubscribeTradeResponses(fn func(*types.EngineResponse) error) error
SubscribeTradeResponses subscribe trade responses
Click to show internal directories.
Click to hide internal directories.