MCPcopy
hub / github.com/PatchMon/PatchMon / RDB

Method RDB

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

RDB returns the request's Redis client from context, or the default if not set.

(ctx stdctx.Context)

Source from the content-addressed store, hash-verified

71
72// RDB returns the request's Redis client from context, or the default if not set.
73func (r *RedisResolver) RDB(ctx stdctx.Context) *redis.Client {
74 if r == nil {
75 return nil
76 }
77 if rdb := RedisFromContext(ctx); rdb != nil {
78 return rdb
79 }
80 return r.Default
81}
82
83// WithEntry injects the host registry entry into the context.
84func WithEntry(ctx stdctx.Context, e *Entry) stdctx.Context {

Callers 15

RateLimitFunction · 0.80
RateLimitAgentByAPIIDFunction · 0.80
StoreMethod · 0.80
GetAndDeleteMethod · 0.80
StoreIDTokenMethod · 0.80
GetAndDeleteIDTokenMethod · 0.80
IsTFALockedMethod · 0.80
RecordFailedAttemptMethod · 0.80
ClearFailedAttemptsMethod · 0.80
CreateTicketMethod · 0.80
ConsumeTicketMethod · 0.80
CreateTicketMethod · 0.80

Calls 1

RedisFromContextFunction · 0.85

Tested by

no test coverage detected