Construct a new instance operating on the given map.
The map must be of ARRAY
type.
Size of the array in items
Convenience function. Alias of values.
Freezes the map, making it non-modifiable from userspace. The map stays writeable from BPF side.
Since Linux 5.2.
Fetch the value at a certain index. Throws on invalid indexes.
Array value
Fetches all values of the array using getBatch.
Iterate through the array values.
This works like values but the iteration is performed in the kernel, returning many items at once. The interator yields each batch produced by the kernel, until an error is found or there are no more entries.
batchSize
specifies the requested size, but batches may
be smaller. If the kernel returns a partial batch together
with an error, the partial batch will be yielded before
throwing the error. If the map is empty, nothing is yielded.
Since Linux 5.6.
Set the value at a certain index. Throws on invalid indexes.
Sets all values of the array using setBatch.
Note that if an error is thrown, part of the entries
could already have been processed. The thrown error
includes a count
field that, if not undefined,
corresponds to the amount of processed entries.
Sets a batch of array indexes to some values. Throws if any of the indexes is invalid.
Since Linux 5.6.
Note that if an error is thrown, part of the entries
could already have been processed. The thrown error
includes a count
field that, if not undefined,
corresponds to the amount of processed entries.
Iterates through the values of the array.
Generated using TypeDoc
Raw version of the IArrayMap interface where values are returned directly as
Buffer
s.