Documentation ¶
Index ¶
- Constants
- func GetDepthBookFromCache(product string) (depthBook pushservice.BookRes, ok bool)
- func InitialCache(ctx sdk.Context, orderKeeper types.OrderKeeper, dexKeeper types.DexKeeper, ...)
- func NewEngine(url string, logger log.Logger, cfg *appCfg.StreamConfig) (types.IStreamEngine, error)
- func StartWSServer(logger log.Logger, endpoint string)
- func UpdateDepthBookCache(product string, bookRes pushservice.BookRes)
- type BaseOp
- type Conn
- type Context
- type Engine
- type ErrorResponse
- type EventResponse
- type PushData
- type SubscriptionTopic
- type TableResponse
Constants ¶
View Source
const ( DexSpotAccount = "dex_spot/account" DexSpotOrder = "dex_spot/order" DexSpotMatch = "dex_spot/matches" DexSpotAllTicker3s = "dex_spot/all_ticker_3s" DexSpotTicker = "dex_spot/ticker" DexSpotDepthBook = "dex_spot/optimized_depth" )
Variables ¶
This section is empty.
Functions ¶
func GetDepthBookFromCache ¶
func GetDepthBookFromCache(product string) (depthBook pushservice.BookRes, ok bool)
func InitialCache ¶
func NewEngine ¶
func NewEngine(url string, logger log.Logger, cfg *appCfg.StreamConfig) (types.IStreamEngine, error)
func StartWSServer ¶
func UpdateDepthBookCache ¶
func UpdateDepthBookCache(product string, bookRes pushservice.BookRes)
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine
type ErrorResponse ¶
type ErrorResponse struct { Event string `json:"event"` Message string `json:"message"` ErrorCode int `json:"errorCode"` }
func (*ErrorResponse) Valid ¶
func (r *ErrorResponse) Valid() bool
type EventResponse ¶
type EventResponse struct { Event string `json:"event"` Success string `json:"success"` Channel string `json:"Channel"` }
func (*EventResponse) Valid ¶
func (r *EventResponse) Valid() bool
type PushData ¶
type PushData struct { *pushservice.RedisBlock // contains filtered or unexported fields }
func NewPushData ¶
func NewPushData() *PushData
func (PushData) DataType ¶
func (data PushData) DataType() types.StreamDataKind
func (*PushData) SetData ¶
func (data *PushData) SetData(ctx sdk.Context, orderKeeper types.OrderKeeper, tokenKeeper types.TokenKeeper, dexKeeper types.DexKeeper, swapKeeper types.SwapKeeper, cache *common.Cache)
type SubscriptionTopic ¶
func FormSubscriptionTopic ¶
func FormSubscriptionTopic(str string) *SubscriptionTopic
func (*SubscriptionTopic) NeedLogin ¶
func (st *SubscriptionTopic) NeedLogin() bool
func (*SubscriptionTopic) ToString ¶
func (st *SubscriptionTopic) ToString() (topic string, err error)
type TableResponse ¶
type TableResponse struct { Table string `json:"table"` Action string `json:"action"` Data []interface{} `json:"data"` }
func (*TableResponse) Valid ¶
func (r *TableResponse) Valid() bool
Click to show internal directories.
Click to hide internal directories.