(ctx context.Context, sctx *super.Context, f expr.Evaluator)
| 203 | } |
| 204 | |
| 205 | func (r *Root) BatchifyBranches(ctx context.Context, sctx *super.Context, f expr.Evaluator) ([]super.Value, error) { |
| 206 | m := sup.NewBSUPMarshalerWithContext(sctx) |
| 207 | m.Decorate(sup.StylePackage) |
| 208 | poolRefs, err := r.ListPools(ctx) |
| 209 | if err != nil { |
| 210 | return nil, err |
| 211 | } |
| 212 | var vals []super.Value |
| 213 | for k := range poolRefs { |
| 214 | pool, err := r.openPool(ctx, &poolRefs[k]) |
| 215 | if err != nil { |
| 216 | // We could have race here because a pool got deleted |
| 217 | // while we looped so we check and continue. |
| 218 | if errors.Is(err, pools.ErrNotFound) { |
| 219 | continue |
| 220 | } |
| 221 | return nil, err |
| 222 | } |
| 223 | vals, err = pool.BatchifyBranches(ctx, sctx, vals, m, f) |
| 224 | if err != nil { |
| 225 | return nil, err |
| 226 | } |
| 227 | } |
| 228 | return vals, nil |
| 229 | } |
| 230 | |
| 231 | type BranchMeta struct { |
| 232 | Pool pools.Config `super:"pool"` |
nothing calls this directly
no test coverage detected