Liking cljdoc? Tell your friends :D

hive-milvus.failure

Failure ADT + classifier + legacy-shape translator for hive-milvus.

Pure, no side effects: classifies Throwables into the closed MilvusFailure ADT and translates ADT values back to the legacy {:success? false :errors [...] :reconnecting? ...} map shape that protocol callers expect. Classification delegates to milvus-clj.client/classify-error (dispatch on the ::client/transport ex-data tag) and walks the full .getCause chain, not just the top throwable.

Failure ADT + classifier + legacy-shape translator for hive-milvus.

Pure, no side effects: classifies Throwables into the closed
`MilvusFailure` ADT and translates ADT values back to the legacy
`{:success? false :errors [...] :reconnecting? ...}` map shape that
protocol callers expect. Classification delegates to
`milvus-clj.client/classify-error` (dispatch on the
`::client/transport` ex-data tag) and walks the full `.getCause`
chain, not just the top throwable.
raw docstring

->legacy-mapclj

(->legacy-map failure)

Translate a MilvusFailure ADT to the legacy fail-map shape expected by protocol callers:

{:success? false :errors [msg] :reconnecting? bool}

:reconnecting? is true for transient and reconnect-timeout variants, false for fatal.

Translate a MilvusFailure ADT to the legacy fail-map shape expected by
protocol callers:

  {:success? false :errors [msg] :reconnecting? bool}

:reconnecting? is true for transient and reconnect-timeout variants,
false for fatal.
sourceraw docstring

->milvus-failureclj

(->milvus-failure kw__7775__auto__)

Coerce a keyword to a MilvusFailure variant (no data fields). Returns nil if keyword is not a valid variant.

Coerce a keyword to a MilvusFailure variant (no data fields).
Returns nil if keyword is not a valid variant.
sourceraw docstring

classifyclj

(classify t)

Classify a Throwable into a MilvusFailure ADT value.

Walks the .getCause chain and returns :milvus/transient when ANY link classifies as transient — either through the ::client/transport-tagged milvus-clj.client/classify-error dispatch (:connection-failure / :retryable) or through the legacy message-marker fallback. Otherwise :milvus/fatal.

Walking the chain matters because milvus-clj.api/* returns futures; when hive-milvus derefs them, a transport-thrown ex-info tagged {::client/transport :http :cause :io} resurfaces wrapped in java.util.concurrent.ExecutionException, whose own ex-data is empty. Only by inspecting the cause do we see the tag and route the failure to the heal loop instead of re-throwing.

The resulting ADT value's :message preserves the top throwable's message for legacy-shape continuity. Returns a MilvusFailure, never throws.

Classify a Throwable into a MilvusFailure ADT value.

Walks the `.getCause` chain and returns `:milvus/transient` when
ANY link classifies as transient — either through the
`::client/transport`-tagged `milvus-clj.client/classify-error`
dispatch (`:connection-failure` / `:retryable`) or through the
legacy message-marker fallback. Otherwise `:milvus/fatal`.

Walking the chain matters because `milvus-clj.api/*` returns
`future`s; when hive-milvus derefs them, a transport-thrown
`ex-info` tagged `{::client/transport :http :cause :io}` resurfaces
wrapped in `java.util.concurrent.ExecutionException`, whose own
ex-data is empty. Only by inspecting the cause do we see the tag
and route the failure to the heal loop instead of re-throwing.

The resulting ADT value's `:message` preserves the top throwable's
message for legacy-shape continuity. Returns a `MilvusFailure`,
never throws.
sourceraw docstring

milvus-failureclj

(milvus-failure variant-kw__7772__auto__)
(milvus-failure variant-kw__7772__auto__ data__7773__auto__)

Construct a MilvusFailure variant. (milvus-failure variant-keyword) for enum variants (milvus-failure variant-keyword data-map) for data variants

Throws ex-info for unknown variants.

Construct a MilvusFailure variant.
(milvus-failure variant-keyword) for enum variants
(milvus-failure variant-keyword data-map) for data variants

Throws ex-info for unknown variants.
sourceraw docstring

milvus-failure?clj

(milvus-failure? x__7774__auto__)

True if x is a MilvusFailure ADT value.

True if x is a MilvusFailure ADT value.
sourceraw docstring

MilvusFailureclj

Closed sum type of failure modes observed while talking to Milvus.

Closed sum type of failure modes observed while talking to Milvus.
sourceraw docstring

MilvusFailureSchemaclj

Runtime shape of the MilvusFailure ADT value returned by classify.

Runtime shape of the MilvusFailure ADT value returned by classify.
sourceraw docstring

reconnect-timeoutclj

(reconnect-timeout message)

Construct a :milvus/reconnect-timeout failure with the given message.

Construct a :milvus/reconnect-timeout failure with the given message.
sourceraw docstring

transient?clj

(transient? failure)

True if failure is a :milvus/transient variant.

True if failure is a :milvus/transient variant.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close