Increment increases the counter by the given value and returns the new count. Parameters: - ctx: Context for cancellation and tracing - key: Unique identifier for the counter - value: Amount to increment the counter by - ttl: Optional time-to-live duration for the counter. If provided and the count
(ctx context.Context, key string, value int64, ttl ...time.Duration)
| 33 | // - int64: The new counter value after incrementing |
| 34 | // - error: Any errors that occurred during the operation |
| 35 | Increment(ctx context.Context, key string, value int64, ttl ...time.Duration) (int64, error) |
| 36 | |
| 37 | // Get retrieves the current value of a counter. |
| 38 | // |
no outgoing calls