go-ceph/internal
John Mulligan e5d1a53060 cutil: add SplitBuffer and SplitSparseBuffer helper functions
Add SplitBuffer and SplitSparseBuffer functions for extracting a list
of strings from a single buffer, typically returned in C code, from
a single Go buffer. The SplitBuffer variant will return empty strings
if multiple nulls are found in sequence, assuming that the C code
packs data between on single null byte (expect the final byte).
The SplitSparseBuffer variant assumes that the C code may not
tightly pack the data with single null bytes and thus will not
return any empty strings (unless the input buffer is empty
or only contains nulls).
Most of the code in the go-ceph codebase is doing the latter but
probably should have been doing the former. Thus both approaches
are provided.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
2020-07-23 16:38:39 -04:00
..
callbacks callbacks: create a helper type for managing callbacks between C and Go 2020-03-04 08:10:48 -05:00
cutil cutil: add SplitBuffer and SplitSparseBuffer helper functions 2020-07-23 16:38:39 -04:00
errutil errutil: move errutil pkg into internal subdir 2020-03-10 08:41:44 +01:00
retry retry: add a helper lib for retrying common operations 2020-04-20 15:08:36 -04:00
timespec timespec: move to internal pkg 2020-06-22 09:22:18 -04:00