Add support for MySQL notifications (fixes #3818) (#3907)

As a new configuration parameter is added, configuration version is
bumped up from 14 to 15.

The MySQL target's behaviour is identical to the PostgreSQL: rows are
deleted from the MySQL table on delete-object events, and are
created/updated on create/over-write events.
This commit is contained in:
Aditya Manthramurthy
2017-03-17 21:59:17 +05:30
committed by Harshavardhana
parent c192e5c9b2
commit 2463ae243a
33 changed files with 5974 additions and 34 deletions
+19
View File
@@ -674,6 +674,25 @@ func loadAllQueueTargets() (map[string]*logrus.Logger, error) {
}
}
// Load MySQL targets, initialize their respective loggers.
for accountID, msqlN := range serverConfig.Notify.GetMySQL() {
if !msqlN.Enable {
continue
}
if queueARN, err := addQueueTarget(queueTargets, accountID, queueTypeMySQL, newMySQLNotify); err != nil {
if _, ok := err.(net.Error); ok {
err = &net.OpError{
Op: "Connecting to " + queueARN,
Net: "tcp",
Err: err,
}
}
return nil, err
}
}
// Load Kafka targets, initialize their respective loggers.
for accountID, kafkaN := range serverConfig.Notify.GetKafka() {
if !kafkaN.Enable {