MCPcopy
hub / github.com/PatchMon/PatchMon / DBResolver

Struct DBResolver

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

DBResolver resolves the database for a request: DB from context, or default. Pass to stores so they use the correct DB per request.

Source from the content-addressed store, hash-verified

34// DBResolver resolves the database for a request: DB from context, or default.
35// Pass to stores so they use the correct DB per request.
36type DBResolver struct {
37 Default *database.DB
38}
39
40// DB returns the request's database from context, or the default if not set.
41func (r *DBResolver) DB(ctx stdctx.Context) *database.DB {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected