MCPcopy
hub / github.com/redis/go-redis / GetCommandPolicy

Method GetCommandPolicy

command_policy_resolver.go:190–205  ·  view source on GitHub ↗
(ctx context.Context, cmd Cmder)

Source from the content-addressed store, hash-verified

188}
189
190func (r *commandInfoResolver) GetCommandPolicy(ctx context.Context, cmd Cmder) *routing.CommandPolicy {
191 if r.resolveFunc == nil {
192 return nil
193 }
194
195 policy := r.resolveFunc(ctx, cmd)
196 if policy != nil {
197 return policy
198 }
199
200 if r.fallBackResolver != nil {
201 return r.fallBackResolver.GetCommandPolicy(ctx, cmd)
202 }
203
204 return nil
205}
206
207func (r *commandInfoResolver) SetFallbackResolver(fallbackResolver *commandInfoResolver) {
208 r.fallBackResolver = fallbackResolver

Callers 2

mapCmdsByNodeMethod · 0.80
routeAndRunMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected