* 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)
| 30 | *collector |
| 31 | */ |
| 32 | func 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. |
| 48 | type factoryIn struct { |