Humiex.State (humiex v0.2.0) View Source
Stores a Humiex Query/Stream search state
Allows Humiex.stream/1 and Humiex.stream_values/1 to resume a Search from a previous one
Link to this section Summary
Types
A Humiex State struct stores the client and query configuration alongside execution metadata such as the latest seen event timestamp and event ids
Link to this section Types
Specs
absolute_time() :: number()
Specs
event_id() :: String.t()
Specs
maybe_time() :: time() | nil
Specs
relative_time() :: String.t()
Specs
t() :: %Humiex.State{ chunk: binary() | nil, client: Humiex.Client.t(), end_time: maybe_time(), event_count: number(), last_timestamp: number(), latest_ids: [event_id()], opts: keyword(), query_string: String.t(), resp: any(), start_time: maybe_time() }
A Humiex State struct stores the client and query configuration alongside execution metadata such as the latest seen event timestamp and event ids
:client
Humiex Client configuration:query_string
Humio search API queryString:start_time
Humio search API start time specification:end_time
Humio search API end time specification:opts
Keyword of additional options such as:live?
uses a live query if set totrue
:state_dest
allows to send the Humiex.State as a message to a process when usingstream_values/4
:resp
Holds a reference to the Client that implements HTTPAsyncBehaviour and it's used to execute the requests:last_timestamp
Last seen timestamp:latest_ids
List of the seen event ids for the last timestamp:event_count
Number of events returned so far:chunk
Internal buffer used to hold the raw api responses before decoding the events
Specs
time() :: relative_time() | absolute_time()