MCPcopy Create free account
hub / github.com/DoNewsCode/core / WithConfigInterceptor

Function WithConfigInterceptor

otmongo/provider_option.go:22–26  ·  view source on GitHub ↗

WithConfigInterceptor instructs the Providers to accept the MongoConfigInterceptor so that users can change config during runtime. This can be useful when some dynamic computations on configs are required.

(interceptor MongoConfigInterceptor)

Source from the content-addressed store, hash-verified

20// MongoConfigInterceptor so that users can change config during runtime. This can
21// be useful when some dynamic computations on configs are required.
22func WithConfigInterceptor(interceptor MongoConfigInterceptor) ProvidersOptionFunc {
23 return func(options *providersOption) {
24 options.interceptor = interceptor
25 }
26}
27
28// WithReload toggles whether the factory should reload cached instances upon
29// OnReload event.

Callers 1

TestIntegrationFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestIntegrationFunction · 0.56