(ctx context.Context)
| 239 | } |
| 240 | |
| 241 | func PersistentConfigReaderFromCtx(ctx context.Context) (pconfig.StorageR, error) { |
| 242 | val := ctx.Value(CtxKeyPersistentConfig) |
| 243 | if val == nil { |
| 244 | return nil, fmt.Errorf("%w: context does not have persistent config reader set", ErrNotFound) |
| 245 | } |
| 246 | |
| 247 | res, valid := val.(pconfig.Storage) |
| 248 | if !valid { |
| 249 | return nil, ErrValueInvalidType |
| 250 | } |
| 251 | |
| 252 | return res, nil |
| 253 | } |
| 254 | |
| 255 | func PersistentConfigWriterFromCtx(ctx context.Context) (pconfig.StorageW, error) { |
| 256 | val := ctx.Value(CtxKeyPersistentConfig) |
nothing calls this directly
no outgoing calls
no test coverage detected