worker

package
v0.0.0-...-0cb664c Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	BaseAsset      string    `json:"base_asset"`
	Exchange       string    `json:"exchange"`
	Price          float64   `json:"price"`
	PriceChange24H float64   `json:"price_change_24h"`
	Volume24H      float64   `json:"volume_24h"`
	Timestamp      time.Time `json:"timestamp"`
}

type ResultData

type ResultData struct {
	Ok     bool    `json:"ok"`
	Code   int     `json:"code"`
	Result Message `json:"result"`
}

type Symbols

type Symbols struct {
	Name    string
	Decimal uint8
}

type WorkerHandle

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

func NewWorkerHandle

func NewWorkerHandle(db *database.DB, wConf *WorkerHandleConfig, shutdown context.CancelCauseFunc) (*WorkerHandle, error)

func (*WorkerHandle) Close

func (sh *WorkerHandle) Close() error

func (*WorkerHandle) Start

func (sh *WorkerHandle) Start() error

type WorkerHandleConfig

type WorkerHandleConfig struct {
	BaseUrl      string
	LoopInterval time.Duration
	SymbolList   []Symbols
}

Jump to

Keyboard shortcuts

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