Documentation ¶
Index ¶
- func NewConnection() *amqp.Connection
- func NewTLSConnection() *amqp.Connection
- type Connection
- func (c *Connection) CloseOperatorChannel() error
- 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) ConsumeQueuedTrades(ch *amqp.Channel, q *amqp.Queue, fn func(*types.Matches, uint64) error) 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) Publish(ch *amqp.Channel, q *amqp.Queue, bytes []byte) error
- func (c *Connection) PublishCancelOrderMessage(o *types.Order) error
- func (c *Connection) PublishEngineResponse(res *types.EngineResponse) error
- func (c *Connection) PublishErrorMessage(matches *types.Matches, errType string) error
- func (c *Connection) PublishInvalidateMakerOrdersMessage(m types.Matches) error
- func (c *Connection) PublishInvalidateTakerOrdersMessage(m types.Matches) error
- func (c *Connection) PublishNewOrderMessage(o *types.Order) error
- func (c *Connection) PublishOrder(order *Message) error
- func (c *Connection) PublishTradeCancelMessage(matches *types.Matches) error
- func (c *Connection) PublishTradeInvalidMessage(matches *types.Matches) error
- func (c *Connection) PublishTradeSentMessage(matches *types.Matches) error
- func (c *Connection) PublishTradeSuccessMessage(matches *types.Matches) error
- func (c *Connection) PublishTrades(matches *types.Matches) error
- func (c *Connection) PublishTxErrorMessage(matches *types.Matches, errType string) error
- func (c *Connection) Purge(ch *amqp.Channel, name string) error
- func (c *Connection) PurgeOperatorQueue() error
- func (c *Connection) SubscribeEngineResponses(fn func(*types.EngineResponse) error) error
- func (c *Connection) SubscribeOperator(fn func(*types.OperatorMessage) error) error
- func (c *Connection) SubscribeOrders(fn func(*Message) error) error
- func (c *Connection) SubscribeTrades(fn func(*types.OperatorMessage) error) error
- func (c *Connection) UnsubscribeOperator() error
- type Message
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConnection ¶
func NewConnection() *amqp.Connection
func NewTLSConnection ¶
func NewTLSConnection() *amqp.Connection
Types ¶
type Connection ¶
type Connection struct {
Conn *amqp.Connection
}
func InitConnection ¶
func InitConnection(address string) *Connection
func (*Connection) CloseOperatorChannel ¶
func (c *Connection) CloseOperatorChannel() error
func (*Connection) ConsumeAfterAck ¶
func (*Connection) ConsumeQueuedTrades ¶
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) PublishCancelOrderMessage ¶
func (c *Connection) PublishCancelOrderMessage(o *types.Order) error
func (*Connection) PublishEngineResponse ¶
func (c *Connection) PublishEngineResponse(res *types.EngineResponse) error
func (*Connection) PublishErrorMessage ¶
func (c *Connection) PublishErrorMessage(matches *types.Matches, errType string) error
func (*Connection) PublishInvalidateMakerOrdersMessage ¶
func (c *Connection) PublishInvalidateMakerOrdersMessage(m types.Matches) error
func (*Connection) PublishInvalidateTakerOrdersMessage ¶
func (c *Connection) PublishInvalidateTakerOrdersMessage(m types.Matches) error
func (*Connection) PublishNewOrderMessage ¶
func (c *Connection) PublishNewOrderMessage(o *types.Order) error
func (*Connection) PublishOrder ¶
func (c *Connection) PublishOrder(order *Message) error
func (*Connection) PublishTradeCancelMessage ¶
func (c *Connection) PublishTradeCancelMessage(matches *types.Matches) error
PublishTradeCancelMessage publishes a message when a trade is cancelled
func (*Connection) PublishTradeInvalidMessage ¶
func (c *Connection) PublishTradeInvalidMessage(matches *types.Matches) error
func (*Connection) PublishTradeSentMessage ¶
func (c *Connection) PublishTradeSentMessage(matches *types.Matches) error
func (*Connection) PublishTradeSuccessMessage ¶
func (c *Connection) PublishTradeSuccessMessage(matches *types.Matches) error
PublishTradeSuccessMessage publishes a message when a trade transaction is successful
func (*Connection) PublishTrades ¶
func (c *Connection) PublishTrades(matches *types.Matches) error
func (*Connection) PublishTxErrorMessage ¶
func (c *Connection) PublishTxErrorMessage(matches *types.Matches, errType string) error
PublishTxErrorMessage publishes a messages when a trade execution fails
func (*Connection) PurgeOperatorQueue ¶
func (c *Connection) PurgeOperatorQueue() error
func (*Connection) SubscribeEngineResponses ¶
func (c *Connection) SubscribeEngineResponses(fn func(*types.EngineResponse) error) error
func (*Connection) SubscribeOperator ¶
func (c *Connection) SubscribeOperator(fn func(*types.OperatorMessage) error) error
func (*Connection) SubscribeOrders ¶
func (c *Connection) SubscribeOrders(fn func(*Message) error) error
func (*Connection) SubscribeTrades ¶
func (c *Connection) SubscribeTrades(fn func(*types.OperatorMessage) error) error
func (*Connection) UnsubscribeOperator ¶
func (c *Connection) UnsubscribeOperator() error
Click to show internal directories.
Click to hide internal directories.