Skip to content

Conversation

@ffhan
Copy link

@ffhan ffhan commented Apr 4, 2021

This implements QueueStack wrapper struct which implements Push, Peek and Pop methods for BPF_QUEUE and BPF_STACK.

They are implemented based on the Python implementation, but completely analogous to current Table implementations.

Table currently doesn't support Push, Pop and Peek methods which are queue and stack specific - I don't think they should be present in the Table struct because they aren't applicable to all types. Python library implements these as separate types that inherit the BaseTable type which is a good design decision imho.

I also included checking keySize in TableIterator Next method because it's possible to get panics out of Next method on empty maps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant