@@ -975,7 +975,7 @@ func (m *Map) guessNonExistentKey() ([]byte, error) {
975975// ErrKeyNotExist is returned when the batch lookup has reached
976976// the end of all possible results, even when partial results
977977// are returned. It should be used to evaluate when lookup is "done".
978- func (m * Map ) BatchLookup (cursor * BatchCursor , keysOut , valuesOut interface {}, opts * BatchOptions ) (int , error ) {
978+ func (m * Map ) BatchLookup (cursor * MapBatchCursor , keysOut , valuesOut interface {}, opts * BatchOptions ) (int , error ) {
979979 return m .batchLookup (sys .BPF_MAP_LOOKUP_BATCH , cursor , keysOut , valuesOut , opts )
980980}
981981
@@ -995,17 +995,17 @@ func (m *Map) BatchLookup(cursor *BatchCursor, keysOut, valuesOut interface{}, o
995995// ErrKeyNotExist is returned when the batch lookup has reached
996996// the end of all possible results, even when partial results
997997// are returned. It should be used to evaluate when lookup is "done".
998- func (m * Map ) BatchLookupAndDelete (cursor * BatchCursor , keysOut , valuesOut interface {}, opts * BatchOptions ) (int , error ) {
998+ func (m * Map ) BatchLookupAndDelete (cursor * MapBatchCursor , keysOut , valuesOut interface {}, opts * BatchOptions ) (int , error ) {
999999 return m .batchLookup (sys .BPF_MAP_LOOKUP_AND_DELETE_BATCH , cursor , keysOut , valuesOut , opts )
10001000}
10011001
1002- // BatchCursor represents a starting point for a batch operation.
1003- type BatchCursor struct {
1002+ // MapBatchCursor represents a starting point for a batch operation.
1003+ type MapBatchCursor struct {
10041004 m * Map
10051005 opaque []byte
10061006}
10071007
1008- func (m * Map ) batchLookup (cmd sys.Cmd , cursor * BatchCursor , keysOut , valuesOut interface {}, opts * BatchOptions ) (int , error ) {
1008+ func (m * Map ) batchLookup (cmd sys.Cmd , cursor * MapBatchCursor , keysOut , valuesOut interface {}, opts * BatchOptions ) (int , error ) {
10091009 if m .typ .hasPerCPUValue () {
10101010 return m .batchLookupPerCPU (cmd , cursor , keysOut , valuesOut , opts )
10111011 }
@@ -1030,7 +1030,7 @@ func (m *Map) batchLookup(cmd sys.Cmd, cursor *BatchCursor, keysOut, valuesOut i
10301030 return n , nil
10311031}
10321032
1033- func (m * Map ) batchLookupPerCPU (cmd sys.Cmd , cursor * BatchCursor , keysOut , valuesOut interface {}, opts * BatchOptions ) (int , error ) {
1033+ func (m * Map ) batchLookupPerCPU (cmd sys.Cmd , cursor * MapBatchCursor , keysOut , valuesOut interface {}, opts * BatchOptions ) (int , error ) {
10341034 count , err := sliceLen (keysOut )
10351035 if err != nil {
10361036 return 0 , fmt .Errorf ("keys: %w" , err )
@@ -1052,7 +1052,7 @@ func (m *Map) batchLookupPerCPU(cmd sys.Cmd, cursor *BatchCursor, keysOut, value
10521052 return n , sysErr
10531053}
10541054
1055- func (m * Map ) batchLookupCmd (cmd sys.Cmd , cursor * BatchCursor , count int , keysOut any , valuePtr sys.Pointer , opts * BatchOptions ) (int , error ) {
1055+ func (m * Map ) batchLookupCmd (cmd sys.Cmd , cursor * MapBatchCursor , count int , keysOut any , valuePtr sys.Pointer , opts * BatchOptions ) (int , error ) {
10561056 cursorLen := int (m .keySize )
10571057 if cursorLen < 4 {
10581058 // * generic_map_lookup_batch requires that batch_out is key_size bytes.
0 commit comments