RunBytes applies retry / hedge / breaker / timeout to an inner function that returns []byte. Used for Get operations.
( ctx context.Context, inner func(ctx context.Context) ([]byte, error), )
| 68 | // RunBytes applies retry / hedge / breaker / timeout to an inner function |
| 69 | // that returns []byte. Used for Get operations. |
| 70 | func (e *cacheExecutor) RunBytes( |
| 71 | ctx context.Context, |
| 72 | inner func(ctx context.Context) ([]byte, error), |
| 73 | ) ([]byte, error) { |
| 74 | if e == nil { |
| 75 | return inner(ctx) |
| 76 | } |
| 77 | return e.runRetry(ctx, func(ctx context.Context) ([]byte, error) { |
| 78 | return e.runHedgeBytes(ctx, inner) |
| 79 | }) |
| 80 | } |
| 81 | |
| 82 | // RunVoid applies retry / hedge / breaker / timeout to an inner function |
| 83 | // that returns only error. Used for Set / Delete operations. |
no test coverage detected