Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AvailableFeedbackReporters = map[string]feedbackReporterInitializer{ "kafka": func(config *viper.Viper, logger *logrus.Logger) (interfaces.FeedbackReporter, error) { return extensions.NewKafkaProducer(config, logger) }, }
AvailableFeedbackReporters contains functions to initialize all feedback reporters
View Source
var AvailableInvalidTokenHandlers = map[string]invalidTokenHandlerInitializer{ "pg": func(config *viper.Viper, logger *logrus.Logger, dbOrNil interfaces.DB) (interfaces.InvalidTokenHandler, error) { return extensions.NewTokenPG(config, logger, dbOrNil) }, }
AvailableInvalidTokenHandlers contains functions to initialize all invalid token handlers
View Source
var AvailableStatsReporters = map[string]statsReporterInitializer{ "statsd": func(config *viper.Viper, logger *logrus.Logger, clientOrNil interfaces.StatsDClient) (interfaces.StatsReporter, error) { return extensions.NewStatsD(config, logger, clientOrNil) }, }
AvailableStatsReporters contains functions to initialize all stats reporters
Functions ¶
func GracefulShutdown ¶ added in v0.2.0
GracefulShutdown waits for wg do complete then exits
func WaitTimeout ¶ added in v0.2.0
WaitTimeout waits for the waitgroup for the specified max timeout. Returns true if waiting timed out. got from http://stackoverflow.com/a/32843750/3987733
Types ¶
type APNSPusher ¶
type APNSPusher struct { CertificatePath string Config *viper.Viper GracefulShutdownTimeout int InvalidTokenHandlers []interfaces.InvalidTokenHandler IsProduction bool Logger *logrus.Logger MessageHandler map[string]interfaces.MessageHandler Queue interfaces.Queue StatsReporters []interfaces.StatsReporter // contains filtered or unexported fields }
APNSPusher struct for apns pusher
func NewAPNSPusher ¶
func NewAPNSPusher( isProduction bool, config *viper.Viper, logger *logrus.Logger, statsdClientOrNil interfaces.StatsDClient, db interfaces.DB, queueOrNil ...interfaces.APNSPushQueue, ) (*APNSPusher, error)
NewAPNSPusher for getting a new APNSPusher instance
type GCMPusher ¶
type GCMPusher struct { Config *viper.Viper GracefulShutdownTimeout int InvalidTokenHandlers []interfaces.InvalidTokenHandler IsProduction bool Logger *logrus.Logger MessageHandler map[string]interfaces.MessageHandler Queue interfaces.Queue StatsReporters []interfaces.StatsReporter // contains filtered or unexported fields }
GCMPusher struct for GCM pusher
func NewGCMPusher ¶
func NewGCMPusher( isProduction bool, config *viper.Viper, logger *logrus.Logger, statsdClientOrNil interfaces.StatsDClient, db interfaces.DB, clientOrNil ...interfaces.GCMClient, ) (*GCMPusher, error)
NewGCMPusher for getting a new GCMPusher instance
Click to show internal directories.
Click to hide internal directories.