Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func NewService(store PriceFeedStore) ports.PriceFeeder
Types ¶
type PriceFeedInfo ¶
func NewPriceFeedInfo ¶
func NewPriceFeedInfo(market ports.Market, source, ticker string) (*PriceFeedInfo, error)
func (PriceFeedInfo) GetId ¶
func (p PriceFeedInfo) GetId() string
func (PriceFeedInfo) GetMarket ¶
func (p PriceFeedInfo) GetMarket() ports.Market
func (PriceFeedInfo) GetSource ¶
func (p PriceFeedInfo) GetSource() string
func (PriceFeedInfo) GetTicker ¶
func (p PriceFeedInfo) GetTicker() string
func (PriceFeedInfo) IsStarted ¶
func (p PriceFeedInfo) IsStarted() bool
type PriceFeedStore ¶
type PriceFeedStore interface { // AddPriceFeed adds a new price feed to the repository. AddPriceFeed(ctx context.Context, info PriceFeedInfo) error // GetPriceFeed returns the price feed with the given ID. GetPriceFeed(ctx context.Context, id string) (*PriceFeedInfo, error) // UpdatePriceFeed updates the price feed. UpdatePriceFeed( ctx context.Context, id string, updateFn func(priceFeed *PriceFeedInfo) (*PriceFeedInfo, error), ) error // RemovePriceFeed removes the price feed with the given ID. RemovePriceFeed(ctx context.Context, id string) error // GetAllPriceFeeds returns all price feeds of all markets. GetAllPriceFeeds(ctx context.Context) ([]PriceFeedInfo, error) Close() }
Click to show internal directories.
Click to hide internal directories.