Skip to content

Commit

Permalink
Adds State typedoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Eduardo committed Nov 4, 2020
1 parent a4472d2 commit dd27d7d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/humiex/state.ex
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,25 @@ defmodule Humiex.State do
@type time() :: relative_time() | absolute_time()
@type maybe_time() :: time() | nil
@type event_id() :: String.t()

@typedoc """
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 to `true`
- `:state_dest` allows to send the Humiex.State as a message to a process when using `stream_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
"""
@type t :: %__MODULE__{
client: Client.t(),
query_string: String.t(),
Expand Down

0 comments on commit dd27d7d

Please sign in to comment.