Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PriceService ¶
type PriceService struct { cmn.BaseService // contains filtered or unexported fields }
Price service fetches the sources periodically.
func NewPriceService ¶
func NewPriceService() *PriceService
func (PriceService) GetPrice ¶
Return pair price, but if it doesn't exist, return reverse pair price.
func (PriceService) GetPriceExact ¶
Return exact base/quote pair price.
func (PriceService) OnStart ¶
func (ps PriceService) OnStart() error
func (PriceService) PushSourceMeta ¶
func (ps PriceService) PushSourceMeta(sourceMeta SourceMeta)
type SourceManager ¶
type SourceManager struct {
// contains filtered or unexported fields
}
func NewSourceManager ¶
func NewSourceManager() *SourceManager
func (*SourceManager) GetSourceMeta ¶
func (manager *SourceManager) GetSourceMeta(pair string, name string, interval time.Duration, weight uint64) SourceMeta
func (*SourceManager) Register ¶
func (manager *SourceManager) Register(pair string, name string, provider types.SourceProvider)
type SourceMeta ¶
type SourceMeta struct { Source types.Source Weight uint64 // contains filtered or unexported fields }
func (*SourceMeta) Fetch ¶
func (meta *SourceMeta) Fetch(logger log.Logger)
type SourceMetaSet ¶
type SourceMetaSet []*SourceMeta
Click to show internal directories.
Click to hide internal directories.