mirror of
https://github.com/minio/minio.git
synced 2025-11-25 20:16:10 -05:00
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:
committed by
Harshavardhana
parent
c192e5c9b2
commit
2463ae243a
@@ -37,6 +37,8 @@ const (
|
||||
queueTypeRedis = "redis"
|
||||
// Static string indicating queue type 'postgresql'.
|
||||
queueTypePostgreSQL = "postgresql"
|
||||
// Static string indicating queue type 'mysql'.
|
||||
queueTypeMySQL = "mysql"
|
||||
// Static string indicating queue type 'kafka'.
|
||||
queueTypeKafka = "kafka"
|
||||
// Static string for Webhooks
|
||||
@@ -156,6 +158,24 @@ func isPostgreSQLQueue(sqsArn arnSQS) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// Returns true if queueArn is for MySQL.
|
||||
func isMySQLQueue(sqsArn arnSQS) bool {
|
||||
if sqsArn.Type != queueTypeMySQL {
|
||||
return false
|
||||
}
|
||||
msqlNotify := serverConfig.Notify.GetMySQLByID(sqsArn.AccountID)
|
||||
if !msqlNotify.Enable {
|
||||
return false
|
||||
}
|
||||
myC, err := dialMySQL(msqlNotify)
|
||||
if err != nil {
|
||||
errorIf(err, "Unable to connect to MySQL server %#v", msqlNotify)
|
||||
return false
|
||||
}
|
||||
defer myC.Close()
|
||||
return true
|
||||
}
|
||||
|
||||
// Returns true if queueArn is for Kafka.
|
||||
func isKafkaQueue(sqsArn arnSQS) bool {
|
||||
if sqsArn.Type != queueTypeKafka {
|
||||
|
||||
Reference in New Issue
Block a user