WithClientConstructor instructs the Providers to accept an alternative constructor for elasticsearch client. Refer to the package elastic for how to construct a custom elastic.Client.
(f func(ClientArgs) (*elastic.Client, error))
| 23 | // WithClientConstructor instructs the Providers to accept an alternative constructor for elasticsearch client. |
| 24 | // Refer to the package elastic for how to construct a custom elastic.Client. |
| 25 | func WithClientConstructor(f func(ClientArgs) (*elastic.Client, error)) ProvidersOptionFunc { |
| 26 | return func(options *providersOption) { |
| 27 | options.clientConstructor = f |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | // WithReload toggles whether to reload the factory after receiving the OnReload |
| 32 | // event. By default, the factory won't be reloaded. |
no outgoing calls