MCPcopy
hub / github.com/unkeyed/unkey / Get

Method Get

pkg/counter/interface.go:48–48  ·  view source on GitHub ↗

Get retrieves the current value of a counter. Parameters: - ctx: Context for cancellation and tracing - key: Unique identifier for the counter Returns: - int64: The current counter value - error: Any errors that occurred during the operation If the counter doesn't exist, implementations should ret

(ctx context.Context, key string)

Source from the content-addressed store, hash-verified

46 // If the counter doesn't exist, implementations should
47 // return 0 and nil error, not an error.
48 Get(ctx context.Context, key string) (int64, error)
49
50 // MultiGet retrieves the values of multiple counters in a single operation.
51 //

Callers 14

GetMethod · 0.65
TestMemoryCounter_DeleteFunction · 0.65
TestRedisCounterFunction · 0.65
TestRedisCounterDeleteFunction · 0.65
applyDefaultsRecursiveFunction · 0.65

Implementers 3

redisCounterpkg/counter/redis.go
memoryCounterpkg/counter/memory.go
mockCounterinternal/services/ratelimit/service_be

Calls

no outgoing calls