Skip to content

Commit

Permalink
feat(hazelcast): make unisocket configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
Th3Shadowbroker committed Nov 11, 2024
1 parent 9633f3a commit 9354990
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type HazelcastConfiguration struct {
Password string `mapstructure:"password"`
Addresses []string `mapstructure:"addresses"`
WriteBehind bool `mapstructure:"writeBehind"`
Unisocket bool `mapstructure:"unisocket"`
}

type MongoConfiguration struct {
Expand Down
1 change: 1 addition & 0 deletions internal/config/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ func setDefaults() {
viper.SetDefault("store.hazelcast.username", "")
viper.SetDefault("store.hazelcast.password", "")
viper.SetDefault("store.hazelcast.writeBehind", true)
viper.SetDefault("store.hazelcast.unisocket", false)

viper.SetDefault("resources", []ResourceConfiguration{})

Expand Down
1 change: 1 addition & 0 deletions internal/store/hazelcast.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func (s *HazelcastStore) Initialize() {
hazelcastConfig.Cluster.Security.Credentials.Username = config.Current.Store.Hazelcast.Username
hazelcastConfig.Cluster.Security.Credentials.Password = config.Current.Store.Hazelcast.Password
hazelcastConfig.Cluster.Network.Addresses = config.Current.Store.Hazelcast.Addresses
hazelcastConfig.Cluster.Unisocket = config.Current.Store.Hazelcast.Unisocket
hazelcastConfig.Logger.CustomLogger = new(utils.HazelcastZerologLogger)

s.ctx = context.Background()
Expand Down

0 comments on commit 9354990

Please sign in to comment.