update handler (#2)
* 🔧 Remove commented-out regex patterns and initialization in config. * ✨ Add NATS message publisher with configuration 📩🚀 * ✨ Add new PlainTextMarshaler and refactor handler in nats package.
This commit is contained in:
@@ -15,6 +15,7 @@ var MyConfig *Config
|
||||
type Config struct {
|
||||
Nats NatsConfig
|
||||
Subscription SubscriptionConfig
|
||||
Publisher PublisherConfig
|
||||
Timeouts TimeoutsConfig
|
||||
Hasura HasuraConfig
|
||||
}
|
||||
@@ -30,6 +31,10 @@ type SubscriptionConfig struct {
|
||||
QueueGroup string `mapstructure:"queue_group"`
|
||||
}
|
||||
|
||||
type PublisherConfig struct {
|
||||
Topic string `mapstructure:"topic"`
|
||||
}
|
||||
|
||||
type TimeoutsConfig struct {
|
||||
Server time.Duration `mapstructure:"server"`
|
||||
ReconnectWait time.Duration `mapstructure:"reconnect_wait"`
|
||||
|
||||
Reference in New Issue
Block a user