Liking cljdoc? Tell your friends :D
Clojure only.

milvus-clj.transport.http

HTTP/REST transport for milvus-clj.client. Talks Milvus v2.5.x REST API on port 19530 (yes, the same port as gRPC — Milvus 2.5+ multiplexes via the proxy) via java.net.http.HttpClient + clojure.data.json.

PORT GOTCHA: do NOT use 9091. That's the metrics/health endpoint and returns 404 page not found on every REST API call. Milvus 2.5+ serves gRPC and the v2 REST API on the SAME port (19530) via the proxy.

Why this exists:

  • HTTP/1.1 with short-lived connections has zero idle state; the gVisor netstack idle-sweep (see transport/grpc.clj for the gory details) cannot kill a connection that doesn't outlive a request.
  • java.net.http is the repo's standard HTTP client (see hive-mcp/src/hive_mcp/embeddings/openrouter.clj for the canonical pattern).

NOTE on Connection: close: java.net.http explicitly rejects the Connection header as restricted (throws IllegalArgumentException). The JDK's HTTP/1.1 client manages connection reuse internally and the default pool's idle timeout is short; combined with our per-record client lifetime (one with-client scope), idle-state exposure is negligible. If a deployment sees gVisor-class idle kills even on HTTP, the mitigation is to open a fresh HttpClient per request — trivial to add later by moving builder construction into http-post.

Implements IMilvusCore + IMilvusAdmin. IMilvusExtras methods throw — hive-milvus doesn't call them and PR-2 scope forbids gold-plating.

Return shapes are LSP-equivalent to transport/grpc.clj — every protocol method here produces the same keyword-keyed map shape as the gRPC do-* helpers, so a conformance suite can swap transports transparently.

Loaded lazily via requiring-resolve from milvus-clj.client/make.

HTTP/REST transport for `milvus-clj.client`. Talks Milvus v2.5.x REST API
on port 19530 (yes, the same port as gRPC — Milvus 2.5+ multiplexes via
the proxy) via `java.net.http.HttpClient` + `clojure.data.json`.

PORT GOTCHA: do NOT use 9091. That's the metrics/health endpoint and
returns `404 page not found` on every REST API call. Milvus 2.5+ serves
gRPC and the v2 REST API on the SAME port (19530) via the proxy.

Why this exists:
  - HTTP/1.1 with short-lived connections has zero idle state; the
    gVisor netstack idle-sweep (see `transport/grpc.clj` for the gory
    details) cannot kill a connection that doesn't outlive a request.
  - `java.net.http` is the repo's standard HTTP client (see
    `hive-mcp/src/hive_mcp/embeddings/openrouter.clj` for the canonical
    pattern).

NOTE on `Connection: close`: java.net.http explicitly rejects the
`Connection` header as restricted (throws `IllegalArgumentException`).
The JDK's HTTP/1.1 client manages connection reuse internally and the
default pool's idle timeout is short; combined with our per-record
client lifetime (one `with-client` scope), idle-state exposure is
negligible. If a deployment sees gVisor-class idle kills even on
HTTP, the mitigation is to open a fresh `HttpClient` per request —
trivial to add later by moving builder construction into `http-post`.

Implements `IMilvusCore` + `IMilvusAdmin`. `IMilvusExtras` methods throw
— hive-milvus doesn't call them and PR-2 scope forbids gold-plating.

Return shapes are LSP-equivalent to `transport/grpc.clj` — every
protocol method here produces the same keyword-keyed map shape as the
gRPC `do-*` helpers, so a conformance suite can swap transports
transparently.

Loaded lazily via `requiring-resolve` from `milvus-clj.client/make`.
raw docstring

classifyclj

(classify ex)

Classify an HTTP-transport exception. Returns one of :connection-failure — IOException / connect-timeout, reconnect needed :retryable — HTTP 5xx / 429, retry in place :fatal — 4xx, schema/auth/caller bug

Classify an HTTP-transport exception. Returns one of
:connection-failure  — IOException / connect-timeout, reconnect needed
:retryable           — HTTP 5xx / 429, retry in place
:fatal               — 4xx, schema/auth/caller bug
sourceraw docstring

openclj

(open opts)

Build an HttpClient from the config map.

Reads agnostic keys (:host, :port, :token, :database) from the top level and HTTP-specific keys (:request-timeout-ms, :connect-timeout-ms) from (:http opts). Default port is 19530 — Milvus 2.5+ multiplexes gRPC and REST on the SAME port via the proxy. Do NOT use 9091, that's the metrics endpoint.

Build an `HttpClient` from the config map.

Reads agnostic keys (`:host`, `:port`, `:token`, `:database`) from the
top level and HTTP-specific keys (`:request-timeout-ms`,
`:connect-timeout-ms`) from `(:http opts)`. Default port is 19530 —
Milvus 2.5+ multiplexes gRPC and REST on the SAME port via the proxy.
Do NOT use 9091, that's the metrics endpoint.
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