Documentation ¶
Index ¶
Constants ¶
View Source
const ( RetryMaxErrCode = 2001 ExchangeNotExistErrCode = 2002 )
View Source
const (
VERSION = "v0.1.0"
)
Variables ¶
View Source
var ( RetryMaxErr = errcode.CreateCoinBaseError( RetryMaxErrCode, "Reach the maximum number of retries", ) ExchangeNotExistErr = errcode.CreateCoinBaseError( ExchangeNotExistErrCode, "Callback not exist: %s") )
Functions ¶
func PrintRawInfo ¶
func PrintRawInfo()
Types ¶
type CoinCorpApp ¶
type CoinCorpApp struct { Ctx context.Context Cfg *config.CoinCorpConfig Exchange map[string]api.ExchangeAPI // contains filtered or unexported fields }
func GetApp ¶
func GetApp() *CoinCorpApp
func NewCoinCorpApp ¶
func NewCoinCorpApp( ctx context.Context, cfg *config.CoinCorpConfig, msgManagerMap map[string]*msgmanager.MessageManager) *CoinCorpApp
func (*CoinCorpApp) Start ¶
func (app *CoinCorpApp) Start() error
func (*CoinCorpApp) Stop ¶
func (app *CoinCorpApp) Stop()
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func (*Worker) StartWorker ¶
func (w *Worker) StartWorker(app *CoinCorpApp)
func (*Worker) StopWorker ¶
func (w *Worker) StopWorker()
type WsClient ¶
type WsClient struct { WsConfig *config.WebsocketConfig ReadWait time.Duration WriteWait time.Duration HeartbeatDuration time.Duration Conn *websocket.Conn // contains filtered or unexported fields }
func NewWsClient ¶
func (*WsClient) StartClient ¶
func (ws *WsClient) StartClient(app *CoinCorpApp)
func (*WsClient) StopClient ¶
func (ws *WsClient) StopClient()
func (*WsClient) WriteBinaryMsg ¶
func (*WsClient) WriteTextMsg ¶
Click to show internal directories.
Click to hide internal directories.