| 410 | } |
| 411 | |
| 412 | func (m *manager) GetCache(ctx context.Context, name string, resolutionData map[string]interface{}) (cache.Cache, error) { |
| 413 | item, err := m.internalRegistry.Get("cache-"+name, registry.WithType(pb.ItemType_GENERIC)) |
| 414 | if err != nil { |
| 415 | return nil, errors.Wrap(err, "cannot get cache-"+name+" from registry") |
| 416 | } |
| 417 | var pool *openurl.Pool[cache.Cache] |
| 418 | if ok := item.As(&pool); !ok { |
| 419 | return nil, errors.New("wrong registry item format for cache-" + name) |
| 420 | } |
| 421 | return pool.Get(ctx, resolutionData) |
| 422 | } |
| 423 | |
| 424 | func (m *manager) initNamespace(ctx context.Context, bootstrap config.Store, base string) error { |
| 425 | m.ns = bootstrap.Val(base, "runtime").Default(m.ns).String() |