(conn *Conn, rawSet *nft.Set)
| 39 | } |
| 40 | |
| 41 | func NewSet(conn *Conn, rawSet *nft.Set) *Set { |
| 42 | var set = &Set{ |
| 43 | conn: conn, |
| 44 | rawSet: rawSet, |
| 45 | expiration: nil, |
| 46 | batch: &SetBatch{ |
| 47 | conn: conn, |
| 48 | rawSet: rawSet, |
| 49 | }, |
| 50 | } |
| 51 | |
| 52 | // retrieve set elements to improve "delete" speed |
| 53 | set.initElements() |
| 54 | |
| 55 | return set |
| 56 | } |
| 57 | |
| 58 | func (this *Set) Raw() *nft.Set { |
| 59 | return this.rawSet |
no test coverage detected