bonny v0.4.1 Bonny.Server.Watcher.ResponseBuffer
Buffers streaming responses from HTTPoison and returns kubernetes watch events as JSON
ResponseBuffer
implementation 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 section Functions
Link to this function
add_chunk(response_buffer, chunk)
add_chunk(response_buffer, chunk)
add_chunk(Bonny.Server.Watcher.ResponseBuffer.t(), binary()) ::
Bonny.Server.Watcher.ResponseBuffer.t()
add_chunk(Bonny.Server.Watcher.ResponseBuffer.t(), binary()) :: Bonny.Server.Watcher.ResponseBuffer.t()
Add an HTTP response chunk to the buffer
Link to this function
get_lines(buffer)
get_lines(buffer)
get_lines(Bonny.Server.Watcher.ResponseBuffer.t()) ::
{[binary()], Bonny.Server.Watcher.ResponseBuffer.t()}
get_lines(Bonny.Server.Watcher.ResponseBuffer.t()) :: {[binary()], Bonny.Server.Watcher.ResponseBuffer.t()}
Returns complete lines of JSON from streaming HTTP Response.
Lines are in NDJSON format; each line is a JSON object.
Link to this function
new()
new()
new() :: Bonny.Server.Watcher.ResponseBuffer.t()
new() :: Bonny.Server.Watcher.ResponseBuffer.t()
Create a new ResponseBuffer