rabbitmq

package
v0.0.0-...-db2df7a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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) Consume

func (c *Connection) Consume(ch *amqp.Channel, q *amqp.Queue) (<-chan amqp.Delivery, error)

func (*Connection) ConsumeAfterAck

func (c *Connection) ConsumeAfterAck(ch *amqp.Channel, q *amqp.Queue) (<-chan amqp.Delivery, error)

func (*Connection) ConsumeQueuedTrades

func (c *Connection) ConsumeQueuedTrades(ch *amqp.Channel, q *amqp.Queue, fn func(*types.Matches, uint64) error) error

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) GetQueue

func (c *Connection) GetQueue(ch *amqp.Channel, queue string) *amqp.Queue

func (*Connection) Publish

func (c *Connection) Publish(ch *amqp.Channel, q *amqp.Queue, bytes []byte) error

Publish

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) Purge

func (c *Connection) Purge(ch *amqp.Channel, name string) error

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

type Message

type Message struct {
	Type string `json:"type"`
	Data []byte `json:"data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL