Golioth Zephyr SDK
Golioth LightDB Stream

Functions

int golioth_stream_push_cb (struct golioth_client *client, const uint8_t *path, enum golioth_content_format format, const uint8_t *data, size_t data_len, golioth_req_cb_t cb, void *user_data)
 Push value to Golioth's LightDB Stream (callback based) More...
 
int golioth_stream_push (struct golioth_client *client, const uint8_t *path, enum golioth_content_format format, const uint8_t *data, size_t data_len)
 Push value to Golioth's LightDB Stream (synchronously) More...
 

Detailed Description

Functions for interacting with the Golioth LightDB Stream service

Function Documentation

◆ golioth_stream_push()

int golioth_stream_push ( struct golioth_client client,
const uint8_t *  path,
enum golioth_content_format  format,
const uint8_t *  data,
size_t  data_len 
)

Push value to Golioth's LightDB Stream (synchronously)

Synchronously push new value to LightDB Stream.

Parameters
[in]clientClient instance
[in]pathLightDB Stream resource path
[in]formatFormat of payload
[in]dataPayload data
[in]data_lenPayload length
Return values
0On success
<0On failure

◆ golioth_stream_push_cb()

int golioth_stream_push_cb ( struct golioth_client client,
const uint8_t *  path,
enum golioth_content_format  format,
const uint8_t *  data,
size_t  data_len,
golioth_req_cb_t  cb,
void *  user_data 
)

Push value to Golioth's LightDB Stream (callback based)

Asynchronously push new value to LightDB Stream and let cb be invoked when server acknowledges it or some error condition happens.

Warning
Experimental API
Parameters
[in]clientClient instance
[in]pathLightDB Stream resource path
[in]formatFormat of payload
[in]dataPayload data
[in]data_lenPayload length
[in]cbCallback executed on response received, timeout or error
[in]user_dataUser data passed to cb
Return values
0On success
<0On failure