broadcaster

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2018 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SocketHandler

func SocketHandler(hub *Hub, c *gin.Context)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

type Data

type Data interface {
}

type FuturesData

type FuturesData struct {
	Bids [][2]string `json:"bids"`
	Asks [][2]string `json:"asks"`
}

type Hub

type Hub struct {
	EtcdClient *clientv3.Client
	// contains filtered or unexported fields
}

func NewHub

func NewHub() *Hub

func (*Hub) RunBroadcaster

func (h *Hub) RunBroadcaster()

func (*Hub) RunOrderBookWatcher

func (h *Hub) RunOrderBookWatcher()

func (*Hub) RunTradeWatcher

func (h *Hub) RunTradeWatcher()

type Message

type Message struct {
	Type      string `json:"type"`
	Mode      string `json:"mode"`
	FuturesID string `json:"futures_id"`
	Data      Data   `json:"data"`
}

type TradeData

type TradeData struct {
	Price    string `json:"price"`
	Quantity string `json:"quantity"`
	Time     string `json:"time"`
}

Jump to

Keyboard shortcuts

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