Opsmaru.Incus.Operation (opsmaru_incus v0.1.0)

Copy Markdown View Source

Native accepted operation bound to the originating backend and host identity. Poll/wait keep native identity and metadata. Local timeout/stream close never imply cancellation. Cancellation first checks authoritative may_cancel and issues at most one native DELETE. No application task/persistence is created.

Summary

Functions

Native AddHandler on an explicit listener bound to the same backend and identity. The operation is refreshed first: a successful final operation returns {:ok, nil} and a failed one its native failure, as natively; otherwise callback receives each decoded Operation event for this operation's ID. The caller owns the listener's lifetime.

Return the current immutable native snapshot without querying Incus.

Explicit native RawOperation request, retaining ETag and accepted identity without waiting.

Refresh the native snapshot on its originating client, retaining identity and ETag.

Native RemoveHandler for a target registered by add_handler/3.

Bound a local wait to an explicit request context; cancellation never sends a backend DELETE.

Functions

add_handler(operation, listener, callback)

Native AddHandler on an explicit listener bound to the same backend and identity. The operation is refreshed first: a successful final operation returns {:ok, nil} and a failed one its native failure, as natively; otherwise callback receives each decoded Operation event for this operation's ID. The caller owns the listener's lifetime.

cancel(operation)

completed?(operation)

data(arg1)

from_response(client, response)

get(operation)

Return the current immutable native snapshot without querying Incus.

poll(operation)

raw(client, method, path, opts \\ [])

Explicit native RawOperation request, retaining ETag and accepted identity without waiting.

refresh(operation)

Refresh the native snapshot on its originating client, retaining identity and ETag.

remove_handler(operation, listener, target)

Native RemoveHandler for a target registered by add_handler/3.

successful?(operation)

wait(operation, opts \\ [])

wait_with_context(operation, request_context, opts \\ [])

Bound a local wait to an explicit request context; cancellation never sends a backend DELETE.

websocket(operation, secret)