MCPcopy Index your code
hub / github.com/PatchMon/PatchMon / WithRedis

Function WithRedis

server-source-code/internal/context/context.go:52–54  ·  view source on GitHub ↗

WithRedis injects the request's Redis client into the context.

(ctx stdctx.Context, rdb *redis.Client)

Source from the content-addressed store, hash-verified

50
51// WithRedis injects the request's Redis client into the context.
52func WithRedis(ctx stdctx.Context, rdb *redis.Client) stdctx.Context {
53 return stdctx.WithValue(ctx, redisContextKey, rdb)
54}
55
56// RedisFromContext returns the request's Redis client from the context, or nil if not set.
57func RedisFromContext(ctx stdctx.Context) *redis.Client {

Callers 1

MiddlewareFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected