9 #ifndef luasandbox_util_heka_message_h_    10 #define luasandbox_util_heka_message_h_    20 #define LSB_UUID_SIZE         16    21 #define LSB_UUID_STR_SIZE     36    22 #define LSB_HDR_FRAME_SIZE    3    23 #define LSB_MIN_HDR_SIZE      14    24 #define LSB_MAX_HDR_SIZE      (255 + LSB_HDR_FRAME_SIZE)    26 #define LSB_UUID          "Uuid"    27 #define LSB_TIMESTAMP     "Timestamp"    28 #define LSB_TYPE          "Type"    29 #define LSB_LOGGER        "Logger"    30 #define LSB_SEVERITY      "Severity"    31 #define LSB_PAYLOAD       "Payload"    32 #define LSB_ENV_VERSION   "EnvVersion"    34 #define LSB_HOSTNAME      "Hostname"    35 #define LSB_FIELDS        "Fields"    37 #define LSB_FRAMED        "framed"    38 #define LSB_SIZE          "size"   162                                            size_t *discarded_bytes,
 LSB_UTIL_EXPORT void lsb_clear_heka_message(lsb_heka_message *m)
Resets the message headers and fields zeroing the allocated memory. 
 
const char * lsb_err_value
 
struct lsb_heka_field lsb_heka_field
 
LSB_UTIL_EXPORT void lsb_free_heka_message(lsb_heka_message *m)
Frees the memory allocated for the message fields. 
 
LSB_UTIL_EXPORT bool lsb_read_heka_field(const lsb_heka_message *m, lsb_const_string *name, int fi, int ai, lsb_read_value *val)
Reads a dynamic field from the Heka message. 
 
lsb_const_string env_version
 
lsb_const_string representation
 
lsb_const_string hostname
 
Data stream output buffer. 
 
Shared types and structures. 
 
LSB_UTIL_EXPORT bool lsb_decode_heka_message(lsb_heka_message *m, const char *buf, size_t len, lsb_logger *logger)
Decodes an array of bytes into a Heka message. 
 
lsb_pb_value_types value_type
 
LSB_UTIL_EXPORT size_t lsb_write_heka_header(char *buf, size_t len)
Writes the Heka framing header to the specified buffer. 
 
struct lsb_heka_message lsb_heka_message
 
LSB_UTIL_EXPORT bool lsb_find_heka_message(lsb_heka_message *m, lsb_input_buffer *ib, bool decode, size_t *discarded_bytes, lsb_logger *logger)
Locates a framed Heka message in an input buffer. 
 
LSB_UTIL_EXPORT lsb_err_value lsb_write_heka_uuid(lsb_output_buffer *ob, const char *uuid, size_t len)
Writes a binary UUID to the output buffer. 
 
LSB_UTIL_EXPORT lsb_err_value lsb_init_heka_message(lsb_heka_message *m, int num_fields)
Zero the structure and allocate memory for at least 'size' fields.