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)
| 20 | // MongoConfigInterceptor so that users can change config during runtime. This can |
| 21 | // be useful when some dynamic computations on configs are required. |
| 22 | func 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. |
no outgoing calls