message_decompression.go | |
---|---|
|
|
Package consumer contains interface for any consumer that is able to process messages. It also contains implementation of Kafka consumer. It is expected that consumed messages are generated by ccx-data-pipeline based on OCP rules framework. The report generated by the framework are enhanced with more context information taken from different sources, like the organization ID, account number, unique cluster name, and the LastChecked timestamp (taken from the incoming Kafka record containing the URL to the archive). It is also expected that consumed messages contains one INFO rule hit that contains cluster version. That rule hit is produced by special rule used only in external data pipeline: "versioninfo|CLUSTERVERSION_INFO" |
|
first magic byte of stream/file compressed by Gzip |
|
second magic byte of stream/file compressed by Gzip |
|
IsMessageInGzipFormat function checks if the format of the message is gzip if it is it will return true if not it will return false |
|
Checking for first 2 bytes in gzip stream witch are 31 and 139 see also https://en.wikipedia.org/wiki/Gzip |
|
DecompressMessage will try to decompress the message if the message is compressed by using any supported method (GZIP at this moment) |
|