summaryrefslogtreecommitdiff
path: root/libnetwork/bitmap
Commit message (Collapse)AuthorAgeFilesLines
* Migrate away from things deprecated in Go 1.20Cory Snider2023-02-151-9/+9
| | | | | | | | | | | "math/rand".Seed - Migrate to using local RNG instances. "archive/tar".TypeRegA - The deprecated constant tar.TypeRegA is the same value as tar.TypeReg and so is not needed at all. Signed-off-by: Cory Snider <csnider@mirantis.com>
* libnetwork/bit{seq,map}: delete CheckConsistency()Cory Snider2023-01-272-145/+0
| | | | | | | | That method was only referenced by ipam.Allocator, but as it no longer stores any state persistently there is no possibility for it to load an inconsistent bit-sequence from Docker 1.9.x. Signed-off-by: Cory Snider <csnider@mirantis.com>
* libnetwork/bitmap: optimize binary serializationCory Snider2023-01-201-1/+1
| | | | | | | The byte-slice temporary is fully overwritten on each loop iteration so it can be safely reused to reduce GC pressure. Signed-off-by: Cory Snider <csnider@mirantis.com>
* libnetwork/bitmap: remove datastore concernsCory Snider2023-01-203-561/+130
| | | | | | | | | | | There is a solid bit-vector datatype hidden inside bitseq.Handle, but it's obscured by all the intrusive datastore and KVObject nonsense. It can be used without a datastore, but the datastore baggage limits its utility inside and outside libnetwork. Extract the datatype goodness into its own package which depends only on the standard library so it can be used in more situations. Signed-off-by: Cory Snider <csnider@mirantis.com>
* libnetwork/bitmap: dup from package bitseqCory Snider2023-01-203-0/+2286
...in preparation for separating the bit-sequence datatype from the datastore persistence (KVObject) concerns. The new package's contents are identical to those of package libnetwork/bitseq to assist in reviewing the changes made on each side of the split. Signed-off-by: Cory Snider <csnider@mirantis.com>