MCPcopy Create free account
hub / github.com/akash-network/provider / PersistentConfigFromCtx

Function PersistentConfigFromCtx

tools/fromctx/context.go:269–281  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

267}
268
269func PersistentConfigFromCtx(ctx context.Context) (pconfig.Storage, error) {
270 val := ctx.Value(CtxKeyPersistentConfig)
271 if val == nil {
272 return nil, fmt.Errorf("%w: context does not have persistent config set", ErrNotFound)
273 }
274
275 res, valid := val.(pconfig.Storage)
276 if !valid {
277 return nil, ErrValueInvalidType
278 }
279
280 return res, nil
281}
282
283func AccountQuerierFromCtx(ctx context.Context) (types.AccountQuerier, error) {
284 val := ctx.Value(CtxKeyAccountQuerier)

Callers 2

newAccountQuerierFunction · 0.92
ordersFetcherMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected