Chunk Sender
class ChunkSender
Send chunks for a given device to Memfault's web services.
One chunk sender must be created for each device; all chunk senders can then share the same MemfaultCloud instance.
Initialization
Use the Builder to instantiate a ChunkSender:
Kotlin:
val chunkSender = ChunkSender.Builder()
.setMemfaultCloud(memfaultCloud)
.setDeviceSerialNumber(deviceSerial)
.build()Content copied to clipboard
Java:
final ChunkSender chunkSender = new ChunkSender.Builder()
.setMemfaultCloud(memfaultCloud)
.setDeviceSerialNumber(deviceSerial)
.build()Content copied to clipboard
Persistent Queuing
By default, the ChunkSender's queue lives in memory. If the application is closed or crashes with chunks un-sent, they will be lost.
If this is an issue for your application, you can provide the ChunkSender with a ChunkQueue that is persistent.
Types
Link copied to clipboard
class Builder
Build a ChunkSender instance for a given device.