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

Function Providers

otredis/dependency.go:32–45  ·  view source on GitHub ↗

* Providers returns a set of dependency providers related to redis. It includes the Maker, the default redis.UniversalClient and exported configs. Depends On: log.Logger contract.ConfigAccessor opentracing.Tracer `optional:"true"` Provide: Maker Factory redis.UniversalClien

(opts ...ProvidersOptionFunc)

Source from the content-addressed store, hash-verified

30 *collector
31*/
32func Providers(opts ...ProvidersOptionFunc) di.Deps {
33 option := providersOption{
34 interceptor: func(name string, opts *redis.UniversalOptions) {},
35 }
36 for _, f := range opts {
37 f(&option)
38 }
39 return di.Deps{
40 provideRedisFactory(&option),
41 provideDefaultClient,
42 provideConfig,
43 di.Bind(new(Factory), new(Maker)),
44 }
45}
46
47// factoryIn is the injection parameter for provideRedisFactory.
48type factoryIn struct {

Callers 4

TestProvideRedisMetricsFunction · 0.92
ExampleFunction · 0.92
TestCollectorFunction · 0.70

Calls 2

BindFunction · 0.92
provideRedisFactoryFunction · 0.85

Tested by 4

TestProvideRedisMetricsFunction · 0.74
ExampleFunction · 0.74
TestCollectorFunction · 0.56