Package codes.grow.packages.loki
Class LiveTailOptions
java.lang.Object
codes.grow.packages.loki.LiveTailOptions
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic LiveTailOptions.Builderbuilder()Starts a builder.static LiveTailOptionsdefaults()Default options: Loki replays the last hour (up to 100 entries), then streams new entries.delayFor()Returns the server-side delay.limit()Returns the maximum number of replayed entries.Returns the callback for entries the server dropped because the client fell behind.onError()Returns the callback for errors after the connection was established (bad frame, abnormal close).start()Returns the replay start.
-
Method Details
-
defaults
Default options: Loki replays the last hour (up to 100 entries), then streams new entries.- Returns:
- the options
-
builder
Starts a builder.- Returns:
- a new builder
-
start
Returns the replay start.- Returns:
- start, or empty (live only: the tail starts at the connection time; without a start Loki itself would replay the last hour)
-
limit
Returns the maximum number of replayed entries.- Returns:
- limit, or empty (Loki default 100)
-
delayFor
Returns the server-side delay.- Returns:
- delay (0–5 s, sent as whole seconds), or empty
-
onDropped
Returns the callback for entries the server dropped because the client fell behind.- Returns:
- the callback (never null)
-
onError
Returns the callback for errors after the connection was established (bad frame, abnormal close).- Returns:
- the callback (never null)
-