Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExchangeLookup ¶
type OrderFilter ¶
type OrderFilter struct { NetworkID int64 `json:"networkId"` MakerAssetProxyID string `json:"makerAssetProxyId"` TakerAssetProxyID string `json:"takerAssetProxyId"` MakerAssetAddress string `json:"makerAssetAddress"` TakerAssetAddress string `json:"takerAssetAddress"` AssetAddress string `json:"assetAddress"` ExchangeAddress string `json:"exchangeContractAddress"` SenderAddress string `json:"senderAddress"` MakerAddress string `json:"makerAddress"` TakerAddress string `json:"takerAddress"` TraderAddress string `json:"traderAddress"` FeeRecipientAddress string `json:"feeRecipient"` MakerAssetData string `json:"makerAssetData"` TakerAssetData string `json:"takerAssetData"` TraderAssetData string `json:"traderAssetData"` PoolID string `json:"_poolId"` PoolName string `json:"_poolName"` TakerFee string `json:"_takerFee"` }
func FilterFromQueryString ¶
func FilterFromQueryString(queryString string) (*OrderFilter, error)
func (*OrderFilter) GetFilter ¶
func (ofilter *OrderFilter) GetFilter(lookup ExchangeLookup) (func(*db.Order) bool, error)
GetFilter returns a function that can be quickly used to evaluate whether a given order matches the criteria of this filter. This is sort of a just-in-time compiler, in that it produces an efficient fuction for testing an order. While this function is fairly complicated, the function it returns will test only the attributes that the filter is interested in, and does not re-evaluate filter parameters when checking each order.
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
type SubscriptionConsumer ¶
type SubscriptionConsumer struct {
// contains filtered or unexported fields
}
func NewSubscriptionConsumer ¶
func NewSubscriptionConsumer(manager *SubscriptionManager, publisher channels.Publisher, filter *OrderFilter, lookup ExchangeLookup) *SubscriptionConsumer
func (*SubscriptionConsumer) Consume ¶
func (consumer *SubscriptionConsumer) Consume(delivery channels.Delivery)
type SubscriptionManager ¶
type SubscriptionManager struct {
// contains filtered or unexported fields
}
func (*SubscriptionManager) Add ¶
func (manager *SubscriptionManager) Add(subscription Subscription)
func (*SubscriptionManager) PruneByPublisher ¶
func (manager *SubscriptionManager) PruneByPublisher(channel channels.Publisher)
func (*SubscriptionManager) Publish ¶
func (manager *SubscriptionManager) Publish(order *db.Order)
func (*SubscriptionManager) Remove ¶
func (manager *SubscriptionManager) Remove(index int)
type SubscriptionMessage ¶
type SubscriptionMessage struct { Type string `json:"type"` Channel string `json:"channel"` RequestID string `json:"requestId"` Payload *OrderFilter }
type SubscriptionUpdate ¶
type WebsocketSubscriptionManager ¶
type WebsocketSubscriptionManager struct {
// contains filtered or unexported fields
}
func NewWebsocketSubscriptionManager ¶
func NewWebsocketSubscriptionManager() *WebsocketSubscriptionManager
func (*WebsocketSubscriptionManager) Consume ¶
func (subs *WebsocketSubscriptionManager) Consume(delivery channels.Delivery)
func (*WebsocketSubscriptionManager) ListenForSubscriptions ¶
Click to show internal directories.
Click to hide internal directories.