wss

package
v0.0.0-...-b7e06eb Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NameDPWSS depthprice
	NameDPWSS = "depthprice"
	// NameCSWSS candlesticks
	NameCSWSS = "candlesticks"
	// NameHTWSS historytrade
	NameHTWSS = "historytrade"
	// NameTKWSS ticker24h
	NameTKWSS = "ticker24h"
	// NameCRWSS cerberus
	NameCRWSS = "cerberus"
)

Variables

View Source
var MapSymbol = make(map[string]string)

MapSymbol Const

View Source
var TKDataCache string

TKDataCache cache TKData

View Source
var TKDataCacheCR string

TKDataCacheCR cache TKData CR

View Source
var TypeTime = map[string]string{
	"1m":  "1m",
	"5m":  "5m",
	"15m": "15m",
	"30m": "30m",
	"1h":  "1h",
	"2h":  "2h",
	"4h":  "4h",
	"6h":  "6h",
	"12h": "12h",
	"1d":  "1d",
	"1w":  "1w",
}

TypeTime type time

Functions

func InitMapSymbol

func InitMapSymbol()

InitMapSymbol init map symbol

func ReloadMapSymbol

func ReloadMapSymbol(listpair string)

ReloadMapSymbol update map symbol

Types

type CRWSServer

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

CRWSServer class

func GetInstanceCR

func GetInstanceCR(name string) *CRWSServer

GetInstanceCR get instance CR

func NewCRWSServer

func NewCRWSServer(name string) *CRWSServer

NewCRWSServer new CRWSServer

func (*CRWSServer) GetHub

func (wss *CRWSServer) GetHub() *HubCR

GetHub get hub

func (*CRWSServer) GetName

func (wss *CRWSServer) GetName() string

GetName get name

func (*CRWSServer) Start

func (wss *CRWSServer) Start()

Start CRWSServer

type CSWSServer

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

CSWSServer class

func GetInstanceCS

func GetInstanceCS(name string) *CSWSServer

GetInstanceCS get instance CS

func NewCSWSServer

func NewCSWSServer(name string) *CSWSServer

NewCSWSServer new CSWSServer

func (*CSWSServer) GetHub

func (wss *CSWSServer) GetHub() *HubLevel2

GetHub get hub

func (*CSWSServer) GetName

func (wss *CSWSServer) GetName() string

GetName get name

func (*CSWSServer) Start

func (wss *CSWSServer) Start()

Start CSWSServer

type Client

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

Client is a middleman between the websocket connection and the hub.

type ClientCR

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

ClientCR is a middleman between the websocket connection and the hub.

type ClientLevel1

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

ClientLevel1 is a middleman between the websocket connection and the hub.

type ClientLevel2

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

ClientLevel2 is a middleman between the websocket connection and the hub.

type DPWSServer

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

DPWSServer class

func GetInstanceDP

func GetInstanceDP(name string) *DPWSServer

GetInstanceDP get instance DP

func NewDPWSServer

func NewDPWSServer(name string) *DPWSServer

NewDPWSServer new DPWSServer

func (*DPWSServer) GetHub

func (wss *DPWSServer) GetHub() *HubLevel1

GetHub get hub

func (*DPWSServer) GetName

func (wss *DPWSServer) GetName() string

GetName get name

func (*DPWSServer) Start

func (wss *DPWSServer) Start()

Start DPWSServer

type HTWSServer

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

HTWSServer class

func GetInstanceHT

func GetInstanceHT(name string) *HTWSServer

GetInstanceHT get instance HT

func NewHTWSServer

func NewHTWSServer(name string) *HTWSServer

NewHTWSServer new HTWSServer

func (*HTWSServer) GetHub

func (wss *HTWSServer) GetHub() *HubLevel1

GetHub get hub

func (*HTWSServer) GetName

func (wss *HTWSServer) GetName() string

GetName get name

func (*HTWSServer) Start

func (wss *HTWSServer) Start()

Start HTWSServer

type Hub

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

Hub maintain the set of active clients and broadcasts message to the client.

func (*Hub) BroadcastMsg

func (h *Hub) BroadcastMsg(msg string)

BroadcastMsg broadcast msg string

func (*Hub) BroadcastMsgByte

func (h *Hub) BroadcastMsgByte(message []byte)

BroadcastMsgByte broadcast msg byte

func (*Hub) GetSizeClient

func (h *Hub) GetSizeClient() int

GetSizeClient get size client

type HubCR

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

HubCR maintain the set of active clients and broadcasts message to the client.

func (*HubCR) BroadcastMsg

func (h *HubCR) BroadcastMsg(msg string)

BroadcastMsg broadcast msg string

func (*HubCR) BroadcastMsgByte

func (h *HubCR) BroadcastMsgByte(message []byte)

BroadcastMsgByte broadcast msg byte

func (*HubCR) GetSizeClientCR

func (h *HubCR) GetSizeClientCR() int

GetSizeClientCR get size client CR

func (*HubCR) GetSizeSymbolClientCR

func (h *HubCR) GetSizeSymbolClientCR(symbol string) int

GetSizeSymbolClientCR get size client CR belong symbol

type HubLevel1

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

HubLevel1 maintain the set of active clients and broadcasts message to the client.

func (*HubLevel1) BroadcastMsg

func (h *HubLevel1) BroadcastMsg(msg string)

BroadcastMsg broadcast msg string

func (*HubLevel1) BroadcastMsgByte

func (h *HubLevel1) BroadcastMsgByte(message []byte)

BroadcastMsgByte broadcast msg byte

func (*HubLevel1) GetSizeClientLevel1

func (h *HubLevel1) GetSizeClientLevel1(symbol string) int

GetSizeClientLevel1 get size client

type HubLevel2

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

HubLevel2 maintain the set of active clients and broadcasts message to the client.

func (*HubLevel2) BroadcastMsg

func (h *HubLevel2) BroadcastMsg(msg string)

BroadcastMsg broadcast msg string

func (*HubLevel2) BroadcastMsgByte

func (h *HubLevel2) BroadcastMsgByte(message []byte)

BroadcastMsgByte broadcast msg byte

func (*HubLevel2) GetSizeClientLevel2

func (h *HubLevel2) GetSizeClientLevel2(key string) int

GetSizeClientLevel2 get size client

type TKWSServer

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

TKWSServer class

func GetInstanceTK

func GetInstanceTK(name string) *TKWSServer

GetInstanceTK get instance TK

func NewTKWSServer

func NewTKWSServer(name string) *TKWSServer

NewTKWSServer new TKWSServer

func (*TKWSServer) GetHub

func (wss *TKWSServer) GetHub() *Hub

GetHub get hub

func (*TKWSServer) GetName

func (wss *TKWSServer) GetName() string

GetName get name

func (*TKWSServer) Start

func (wss *TKWSServer) Start()

Start TKWSServer

Jump to

Keyboard shortcuts

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