(ctx context.Context, key string, value []byte, ttl time.Duration)
| 351 | } |
| 352 | |
| 353 | func (c *MemcachedClient) Set(ctx context.Context, key string, value []byte, ttl time.Duration) error { |
| 354 | return c.storeOperation(ctx, key, value, ttl, opSet, func(ctx context.Context, key string, value []byte, ttl time.Duration) error { |
| 355 | select { |
| 356 | case <-ctx.Done(): |
| 357 | return ctx.Err() |
| 358 | default: |
| 359 | return c.setSingleItem(key, value, ttl) |
| 360 | } |
| 361 | }) |
| 362 | } |
| 363 | |
| 364 | func (c *MemcachedClient) setSingleItem(key string, value []byte, ttl time.Duration) error { |
| 365 | ttlSeconds, ok := toSeconds(ttl) |
nothing calls this directly
no test coverage detected