Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ItemWatcher ¶
type ItemWatcher struct { Client *next.Client UpdateInterval time.Duration // contains filtered or unexported fields }
ItemWatcher holds information about items to watch after
func New ¶
func New(client *next.Client, config *Config) (*ItemWatcher, error)
New constructs new ItemWatcher instance
func (*ItemWatcher) AddItem ¶
func (w *ItemWatcher) AddItem(item *shop.Item) error
AddItem add given item to the list of watched items
func (ItemWatcher) InStockChan ¶
func (w ItemWatcher) InStockChan() <-chan shop.Item
InStockChan returns channel where InStock items will appear
func (*ItemWatcher) RemoveItem ¶
func (w *ItemWatcher) RemoveItem(item shop.Item)
RemoveItem removes watching item from the list so it will not be processed next time when cron fires
func (*ItemWatcher) Start ¶
func (w *ItemWatcher) Start() error
Start begins watcher's loop of checks
Click to show internal directories.
Click to hide internal directories.