Expire queues an Expire command. The parameters are identical to the DMap.Expire, but it returns FutureExpire to read the batched response.
(ctx context.Context, key string, timeout time.Duration)
| 270 | // Expire queues an Expire command. The parameters are identical to the DMap.Expire, |
| 271 | // but it returns FutureExpire to read the batched response. |
| 272 | func (dp *DMapPipeline) Expire(ctx context.Context, key string, timeout time.Duration) (*FutureExpire, error) { |
| 273 | cmd := protocol.NewExpire(dp.dm.name, key, timeout).Command(ctx) |
| 274 | partID, index := dp.addCommand(key, cmd) |
| 275 | return &FutureExpire{ |
| 276 | dp: dp, |
| 277 | partID: partID, |
| 278 | index: index, |
| 279 | ctx: dp.ctx, |
| 280 | closedCtx: dp.closedCtx, |
| 281 | }, nil |
| 282 | } |
| 283 | |
| 284 | // FutureIncr is used to read the result of a pipelined Incr command. |
| 285 | type FutureIncr struct { |
nothing calls this directly
no test coverage detected