BatchLookup looks up many elements in a map at once. "keysOut" and "valuesOut" must be of type slice, a pointer to a slice or buffer will not work. "cursor" is an pointer to an opaque handle. It must be non-nil. Pass "cursor" to subsequent calls of this function to continue the batching operation i
(cursor *MapBatchCursor, keysOut, valuesOut any, opts *BatchOptions)
| 1243 | // the end of all possible results, even when partial results |
| 1244 | // are returned. It should be used to evaluate when lookup is "done". |
| 1245 | func (m *Map) BatchLookup(cursor *MapBatchCursor, keysOut, valuesOut any, opts *BatchOptions) (int, error) { |
| 1246 | n, err := m.batchLookup(sys.BPF_MAP_LOOKUP_BATCH, cursor, keysOut, valuesOut, opts) |
| 1247 | if err != nil { |
| 1248 | return n, fmt.Errorf("map batch lookup: %w", err) |
| 1249 | } |
| 1250 | return n, nil |
| 1251 | } |
| 1252 | |
| 1253 | // BatchLookupAndDelete looks up many elements in a map at once, |
| 1254 | // |