bonny v0.3.2 Bonny.Watcher.ResponseBuffer

Buffers streaming responses from HTTPoison and returns kubernetes watch events as JSON

ResponseBuffer implementation borrowed from Kazan's LineBuffer.

Link to this section Summary

Functions

Add an HTTP response chunk to the buffer

Returns complete lines of JSON from streaming HTTP Response.

Create a new ResponseBuffer

Link to this section Types

Link to this type

t()
t() :: %Bonny.Watcher.ResponseBuffer{lines: [binary()], pending: binary()}

Link to this section Functions

Add an HTTP response chunk to the buffer

Returns complete lines of JSON from streaming HTTP Response.

Lines are in NDJSON format; each line is a JSON object.

Create a new ResponseBuffer