Documentation ¶
Index ¶
- func CompressGZIP(data []byte) (compressedData []byte, err error)
- func CompressWhenNeeded(data []byte) (resultData []byte, compression *string, err error)
- func DecompressGZIP(compressedData []byte) (decompressedData []byte, err error)
- func DecompressWhenNeeded(data []byte, compression sql.NullString) (resultData []byte, err error)
- func DeserializeMap(jsonStr string) (map[string]interface{}, error)
- func GenerateRandomString(length int) string
- func HumanReadableSize(data []byte) string
- func SerializeMap(m map[string]interface{}) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompressGZIP ¶
func CompressWhenNeeded ¶
TODO: check if it's worth trying to compress the data prior to compressing it (e.g: using entropy algorithms) This would save some CPU usage client side TODO: have telemetry data type be passed in as a parameter to further check if we should compress data and which algorithm to use (e.g: deflate or gzip)
func DecompressGZIP ¶
func DecompressWhenNeeded ¶
func DecompressWhenNeeded(data []byte, compression sql.NullString) (resultData []byte, err error)
TODO: have telemetry data type be passed in as a parameter to further check if we should decompress data and which algorithm to use (e.g: deflate or gzip)
func DeserializeMap ¶
func GenerateRandomString ¶
func HumanReadableSize ¶
func SerializeMap ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.