bucket

package
v0.0.0-...-45a0acb Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2017 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	/*support exchanges*/
	EXCHANGE_POLONIEX = "poloniex"
	EXCHANGE_BITTREX  = "bittrex"
	EXCHANGE_UPBIT    = "upbit"
	EXCHANGE_BITFINEX = "bitfinex"

	/*subscribe topic list*/
	//This topic is called when data comes in
	TOPIC_DATA = "bucket:data"
	//This topic is called when db is updated.
	TOPIC_UPDATE = "bucket:update"
	TOPIC_TICKER = "bucket:ticker"
	TOPIC_STATUS = "bucket:status"
)

Variables

This section is empty.

Functions

func CompareStrings

func CompareStrings(a, b []string) bool

func Instance

func Instance() *bucket

Types

type AssetStatus

type AssetStatus struct {
	First  int64
	Last   int64
	IsStop bool
}

type Status

type Status struct {
	First time.Time
	Last  time.Time
	// contains filtered or unexported fields
}

type StatusUpdateEvent

type StatusUpdateEvent func(market string, pair cdb.Pair, status AssetStatus)

type TickerUpdateEvent

type TickerUpdateEvent func()

type UpdateEvent

type UpdateEvent func(market string, pair cdb.Pair, data []cdb.MarketTake)

type Worker

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

func NewWorker

func NewWorker(bus EventBus.Bus, src source.DataSource) *Worker

func (*Worker) Add

func (w *Worker) Add(pair coindb.Pair)

func (*Worker) Run

func (w *Worker) Run()

func (*Worker) Stop

func (w *Worker) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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