MCPcopy
hub / github.com/redis/go-redis / ApplyDefaultsWithPoolSize

Method ApplyDefaultsWithPoolSize

maintnotifications/config.go:215–217  ·  view source on GitHub ↗

ApplyDefaultsWithPoolSize applies default values to any zero-value fields in the configuration, using the provided pool size to calculate worker defaults. This ensures that partially configured structs get sensible defaults for missing fields.

(poolSize int)

Source from the content-addressed store, hash-verified

213// using the provided pool size to calculate worker defaults.
214// This ensures that partially configured structs get sensible defaults for missing fields.
215func (c *Config) ApplyDefaultsWithPoolSize(poolSize int) *Config {
216 return c.ApplyDefaultsWithPoolConfig(poolSize, 0)
217}
218
219// ApplyDefaultsWithPoolConfig applies default values to any zero-value fields in the configuration,
220// using the provided pool size and max active connections to calculate worker and queue defaults.

Callers 8

TestApplyDefaultsFunction · 0.95
TestMaxWorkersLogicFunction · 0.95
ApplyDefaultsMethod · 0.95
TestConfigFunction · 0.80
NewPoolHookWithPoolSizeFunction · 0.80

Calls 1

Tested by 5

TestApplyDefaultsFunction · 0.76
TestMaxWorkersLogicFunction · 0.76
TestConfigFunction · 0.64