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

Function Providers

otes/dependency.go:30–44  ·  view source on GitHub ↗

* Providers returns a set of dependency providers. It includes the Maker, the default *elastic.Client and exported configs. Depends On: log.Logger contract.ConfigAccessor opentracing.Tracer `optional:"true"` contract.Dispatcher `optional:"true"` contract.DIPopulator Provides: Fa

(opts ...ProvidersOptionFunc)

Source from the content-addressed store, hash-verified

28 *elastic.Client
29*/
30func Providers(opts ...ProvidersOptionFunc) di.Deps {
31 options := providersOption{
32 interceptor: func(name string, opt *Config) {},
33 clientConstructor: newClient,
34 }
35 for _, f := range opts {
36 f(&options)
37 }
38 return di.Deps{
39 provideEsFactory(&options),
40 provideDefaultClient,
41 provideConfig,
42 di.Bind(new(Factory), new(Maker)),
43 }
44}
45
46// EsConfigInterceptor is an injector type hint that allows user to do
47// last minute modification to es configurations.

Callers 2

ExampleFunction · 0.92
Example_providersFunction · 0.92

Calls 2

BindFunction · 0.92
provideEsFactoryFunction · 0.85

Tested by 2

ExampleFunction · 0.74
Example_providersFunction · 0.74