Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CoinUpdater ¶
type CoinUpdater struct {
// contains filtered or unexported fields
}
func NewCoinUpdater ¶
func NewCoinUpdater(store *store.Store, log log.Logger, nE *notifications.Notifications, n *Notifier, p pusher, config CoinUpdaterConfig, cm *coinmanager.CoinManager) *CoinUpdater
func (*CoinUpdater) Run ¶
func (c *CoinUpdater) Run()
func (*CoinUpdater) RunPopularPostUpdates ¶
func (c *CoinUpdater) RunPopularPostUpdates()
func (*CoinUpdater) Stop ¶
func (c *CoinUpdater) Stop()
type CoinUpdaterConfig ¶
type Config ¶
type Config struct { EnableBugSnag bool EmbedlyToken string ThumborHost string ThumborPort int Port int FCMServerKey string AMPKey string NSQDAddress string NSQLookupdAddress string SendGridAPIKey string SlackWebhook string GraphMonitorInterval int CoinUpdater CoinUpdaterConfig }
Config provides the configuration required by the worker package.
type DatabaseMonitor ¶
type DatabaseMonitor struct {
// contains filtered or unexported fields
}
DatabaseMonitor sends selected metrics about data accessible from the database, i.e. number of users in the database.
func NewDatabaseMonitor ¶
NewDatabaseMonitor returns a new instance of DatabaseMonitor.
func (*DatabaseMonitor) Start ¶
func (dm *DatabaseMonitor) Start()
Start launches a go routine which will continiously update database metrics until Stop is called.
func (*DatabaseMonitor) Stop ¶
func (dm *DatabaseMonitor) Stop()
Stop shuts down the go routine launched in Start.
type Notifier ¶
type Notifier struct { FirebaseClient *fcm.Client Store *store.Store SlackWebhook string // contains filtered or unexported fields }
Notifier manages the notifications to be send out to the user. It identifies each node with a list of possible devices.
func NewNotifier ¶
NewNotifier returns a NotificationWorker to issue notifications.
func (*Notifier) NotifyPush ¶
func (n *Notifier) NotifyPush(eN *model.ExportedNotification) error
Notify is used to notify a given user (node) about a new card.
func (*Notifier) NotifySlack ¶
type PendingPushMap ¶
func (*PendingPushMap) SetPending ¶
func (p *PendingPushMap) SetPending(id globalid.ID, to bool)
type ReengagementWorker ¶
type ReengagementWorker struct {
// contains filtered or unexported fields
}
SessionCleaner is responsible for invalidating sessions which have been expired.
func NewReengagementWorker ¶
NewSessionCleaner returns a new instance of SessionCleaner.
func (*ReengagementWorker) Start ¶
func (rw *ReengagementWorker) Start()
Start starts the worker. This method should be called as a goroutine, otherwise it will block any further execution.
func (*ReengagementWorker) Stop ¶
func (rw *ReengagementWorker) Stop()
Stop shuts down the go routine launched in Start.
type SessionCleaner ¶
type SessionCleaner struct {
// contains filtered or unexported fields
}
SessionCleaner is responsible for invalidating sessions which have been expired.
func NewSessionCleaner ¶
func NewSessionCleaner(s *store.Store, l log.Logger) *SessionCleaner
NewSessionCleaner returns a new instance of SessionCleaner.
func (*SessionCleaner) Start ¶
func (sc *SessionCleaner) Start()
Start starts the worker. This method should be called as a goroutine, otherwise it will block any further execution.
func (*SessionCleaner) Stop ¶
func (sc *SessionCleaner) Stop()
Stop shuts down the go routine launched in Start.