Versions in this module Expand all Collapse all v0 v0.0.42 Aug 12, 2021 Changes in this version + func NewMarketChannelCreator(fetcher SnapshotFetcher) func(channelID string) IChannel + func RegisterChannelCreator(prefix string, fn func(channelID string) IChannel) + type Channel struct + Clients map[string]*Client + ID string + Messages chan *common.WebSocketMessage + Subscribe chan *Client + Unsubscribe chan string + func (c *Channel) AddMessage(msg *common.WebSocketMessage) + func (c *Channel) AddSubscriber(client *Client) + func (c *Channel) GetID() string + func (c *Channel) MessagesChan() chan *common.WebSocketMessage + func (c *Channel) RemoveSubscriber(ID string) + func (c *Channel) SubScribeChan() chan *Client + func (c *Channel) UnsubscribeChan() chan string + type Client struct + Channels map[string]*Channel + Conn clientConn + ID string + func NewClient() *Client + func (c *Client) Send(data interface{}) error + type ClientRequest struct + Channels []string + Type string + type DefaultHttpSnapshotFetcher struct + ApiUrl string + func (f *DefaultHttpSnapshotFetcher) GetV2(marketID string) *common.SnapshotV2 + type IChannel interface + AddMessage func(message *common.WebSocketMessage) + AddSubscriber func(*Client) + GetID func() string + MessagesChan func() chan *common.WebSocketMessage + RemoveSubscriber func(string) + SubScribeChan func() chan *Client + UnsubscribeChan func() chan string + type OnMessageResult struct + Amount decimal.Decimal + Price decimal.Decimal + Side string + type Orderbook struct + Sequence uint64 + type SnapshotFetcher interface + GetV2 func(marketID string) *common.SnapshotV2 + type WSServer struct + func NewWSServer(addr string, sourceQueue common.IQueue) *WSServer + func (s *WSServer) Start(ctx context.Context)