Documentation
¶
Index ¶
- func CheckDisconnections(c *websocket.Conn, logger zerolog.Logger) (context.Context, context.CancelFunc, error)
- func GetExchange(name string) (common.Exchange, bool)
- func GetExchanges(enabledExchanges ...string) []common.Exchange
- func RegisterExchange(exchange common.Exchange)
- type Exchange
- func (e *Exchange) AvailablePairs() []common.Pair
- func (e *Exchange) CheckDisconnections(c *websocket.Conn, logger zerolog.Logger) (context.Context, context.CancelFunc, error)
- func (e *Exchange) CheckResponse(resp *http.Response) error
- func (e *Exchange) Close() error
- func (e *Exchange) GetOrderBook(pair common.Pair) *orderbook.OrderBook
- func (e *Exchange) GetSnapshot(pair common.Pair) (common.Snapshot, error)
- func (e *Exchange) Name() string
- func (e *Exchange) NewOrderBook(pair common.Pair, pairLogger zerolog.Logger) *orderbook.OrderBook
- func (e *Exchange) OnOrderBookUpdate(initial bool, pair common.Pair)
- func (e *Exchange) PairAvailable(pair common.Pair) bool
- func (e *Exchange) SetMaxSnapshotSize(val int)
- func (e *Exchange) SubscribeUpdates(pair common.Pair, chanSize int) chan uint64
- func (e *Exchange) UnsubscribeUpdates(pair common.Pair) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDisconnections ¶
func GetExchanges ¶
func RegisterExchange ¶
Types ¶
type Exchange ¶
type Exchange struct { Ws map[string]*websocket.Conn OrderBooks map[string]*orderbook.OrderBook Lock sync.Mutex Logger zerolog.Logger // contains filtered or unexported fields }
func (*Exchange) AvailablePairs ¶
func (*Exchange) CheckDisconnections ¶
func (*Exchange) GetOrderBook ¶
func (*Exchange) GetSnapshot ¶
func (*Exchange) NewOrderBook ¶
func (*Exchange) OnOrderBookUpdate ¶
func (*Exchange) SetMaxSnapshotSize ¶
func (*Exchange) SubscribeUpdates ¶
Click to show internal directories.
Click to hide internal directories.