Documentation ¶
Index ¶
- Variables
- type Base
- func (b *Base) GetName() string
- func (b *Base) GetOrderbook(exchangeName string) string
- func (b *Base) GetPortfolio() string
- func (b *Base) GetSettings() string
- func (b *Base) GetStatus() string
- func (b *Base) GetTicker(exchangeName string) string
- func (b *Base) IsConnected() bool
- func (b *Base) IsEnabled() bool
- type Event
- type IComm
- type ICommunicate
- type Orderbook
- type Portfolio
- type Settings
- type Ticker
Constants ¶
This section is empty.
Variables ¶
var ( TickerStaged map[string]map[string]map[string]ticker.Price OrderbookStaged map[string]map[string]map[string]Orderbook PortfolioStaged Portfolio SettingsStaged Settings ServiceStarted time.Time )
global vars contain staged update data that will be sent to the communication mediums
Functions ¶
This section is empty.
Types ¶
type Base ¶
Base enforces standard variables across communication packages
func (*Base) GetOrderbook ¶
GetOrderbook returns staged orderbook data
func (*Base) GetPortfolio ¶
GetPortfolio returns staged portfolio info
func (*Base) GetSettings ¶
GetSettings returns stage setting info
func (*Base) IsConnected ¶
IsConnected returns if the package is connected to a server and/or ready to send
type IComm ¶
type IComm []ICommunicate
IComm is the main interface array across the communication packages
func (IComm) GetEnabledCommunicationMediums ¶
func (c IComm) GetEnabledCommunicationMediums()
GetEnabledCommunicationMediums prints out enabled and connected communication packages (#debug output only)
func (IComm) Setup ¶
func (c IComm) Setup()
Setup sets up communication variables and intiates a connection to the communication mediums
func (IComm) StageOrderbookData ¶
StageOrderbookData stages updated orderbook data for the communications package
type ICommunicate ¶
type ICommunicate interface { Setup(config *config.CommunicationsConfig) Connect() error PushEvent(Event) error IsEnabled() bool IsConnected() bool GetName() string }
ICommunicate enforces standard functions across communication packages
type Orderbook ¶
type Orderbook struct { CurrencyPair string AssetType string TotalAsks float64 TotalBids float64 LastUpdated string }
Orderbook holds the minimal orderbook details to be sent to a communication medium
type Portfolio ¶
type Portfolio struct {
ProfitLoss string
}
Portfolio holds the minimal portfolio details to be sent to a communication medium