madmin-go icon indicating copy to clipboard operation
madmin-go copied to clipboard

postgresql events notification

Open romanchechyotkin opened this issue 1 year ago • 4 comments

added functionality for creating postgresql events notification

romanchechyotkin avatar Jul 29 '24 16:07 romanchechyotkin

this was created using examples/set_postgresql_notification.go file image

romanchechyotkin avatar Jul 29 '24 16:07 romanchechyotkin

then i want to add functionality for connecting configuared event notification to bucket in minio-go image

romanchechyotkin avatar Jul 29 '24 16:07 romanchechyotkin

i suppose there is need to write kind of this functions for oher integrations like MySQl, Redis, Kafka and etc

romanchechyotkin avatar Jul 29 '24 16:07 romanchechyotkin

using options struct instead of the raw string i guess this way more self-explanatory then using set config and provide the raw string under the hood, this function calls SetConfigKV but builds config string using provided parameters from struct

romanchechyotkin avatar Jul 30 '24 19:07 romanchechyotkin

Pro: Convenient Cons: Seems a bit strange to offer this as a single config to abstract.

Undecided.

klauspost avatar Aug 05 '24 14:08 klauspost

Yea, i am going to implement this functionality for all supported integratioins, theres is reused config values

        // Staging directory for undelivered messages e.g. '/home/events'
	QueueDir string

	// Maximum limit for undelivered messages, defaults to '10000'
	QueueLimit uint

	// Specify a comment to associate with the Postgresql configuration
	Comment string

The question is if it would be accepted as test for postgresql, if yes i continue to implement this functionality

romanchechyotkin avatar Aug 06 '24 08:08 romanchechyotkin

It is not implemented purposely, so we don't have to bind by some structured contract. If we merge and publish this, we must maintain it for eternity. the KV API is kept fluid as the MinIO server changes it also changes automatically without making any new "madmin-go" releases.

If you want, you can keep a fork for your work that wraps on top of this SDK. While convenient there, this PR is a hidden burden on why we didn't do it ourselves.

harshavardhana avatar Aug 06 '24 15:08 harshavardhana