Created
October 17, 2017 16:56
-
-
Save deekoder/1519163f1891e70d1106ed5e97cf833c to your computer and use it in GitHub Desktop.
Revisions
-
deekoder revised this gist
Oct 17, 2017 . No changes.There are no files selected for viewing
-
deekoder created this gist
Oct 17, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ func setUp() { minioClient, err := minio.New("192.168.1.15:9000", "minio", "minio123", false) if err != nil { log.Fatalln(err) } queueArn := minio.NewArn("minio", "sqs", "", "1", "postgresql") queueConfig := minio.NewNotificationConfig(queueArn) queueConfig.AddEvents(minio.ObjectCreatedAll, minio.ObjectRemovedAll) bucketNotification := minio.BucketNotification{} bucketNotification.AddQueue(queueConfig) err = minioClient.SetBucketNotification("barcodes", bucketNotification) if err != nil { fmt.Println("Unable to set the bucket notification: ", err) } fmt.Println("Set Bucket Notification successfully") }