Module golem_rust::bindings::golem::api::host

source ·

Structs§

Enums§

Functions§

  • Generates an idempotency key. This operation will never be replayed — i.e. not only is this key generated, but it is persisted and committed, such that the key can be used in third-party systems (e.g. payment processing) to introduce idempotence.
  • Gets the current idempotence mode. See set-idempotence-mode for details.
  • Returns the current position in the persistent op log
  • Gets the worker’s current persistence level.
  • Gets the current retry policy associated with the worker
  • Returns a Golem worker URI that can be used to invoke a given function on the current worker
  • Suspends execution until the given promise gets completed, and returns the payload passed to the promise completion.
  • Completes the given promise with the given payload. Returns true if the promise was completed, false if the promise was already completed. The payload is passed to the worker that is awaiting the promise.
  • Create a new promise
  • Deletes the given promise
  • Marks the beginning of an atomic operation. In case of a failure within the region selected by mark-begin-operation and mark-end-operation the whole region will be reexecuted on retry. The end of the region is when mark-end-operation is called with the returned oplog-index.
  • Commits this atomic operation. After mark-end-operation is called for a given index, further calls with the same parameter will do nothing.
  • Blocks the execution until the oplog has been written to at least the specified number of replicas, or the maximum number of replicas if the requested number is higher.
  • Sets the current idempotence mode. The default is true. True means side-effects are treated idempotent and Golem guarantees at-least-once semantics. In case of false the executor provides at-most-once semantics, failing the worker in case it is not known if the side effect was already executed.
  • Makes the current worker travel back in time and continue execution from the given position in the persistent op log.
  • Sets the worker’s current persistence level. This can increase the performance of execution in cases where durable execution is not required.
  • Overrides the current retry policy associated with the worker. Following this call, get-retry-policy will return the new retry policy.
  • Initiates an update attempt for the given worker. The function returns immediately once the request has been processed, not waiting for the worker to get updated.

Type Aliases§