Wardrik.Operations.Agents (wardrik v0.1.0-rc.1)

Copy Markdown

Operations over the agents that resource patterns cover: listing them and their events.

Summary

Functions

Cancels what each agent is doing. Returns those that were cancelled.

Returns a page of the agents' events.

Forgets each agent. Returns those forgotten, those kept because they're declared, and those that failed, with why.

Returns the cursor at the end of the agents' logs.

Lists the calls the agents wait on a person for.

Lists the agents.

Streams the agents' events as {event, cursor}. Reads what's there, then follows new events.

Functions

cancel(scope, input)

@spec cancel(Wardrik.Scope.t(), map()) :: {:ok, map()}

Cancels what each agent is doing. Returns those that were cancelled.

events(scope, input)

@spec events(Wardrik.Scope.t(), map()) :: {:ok, map()} | {:error, Wardrik.Error.t()}

Returns a page of the agents' events.

forget(scope, input)

@spec forget(Wardrik.Scope.t(), map()) :: {:ok, map()}

Forgets each agent. Returns those forgotten, those kept because they're declared, and those that failed, with why.

head(scope, input)

@spec head(Wardrik.Scope.t(), map()) :: {:ok, map()}

Returns the cursor at the end of the agents' logs.

interrupts(scope, input)

@spec interrupts(Wardrik.Scope.t(), map()) :: {:ok, map()}

Lists the calls the agents wait on a person for.

list(scope, input)

@spec list(Wardrik.Scope.t(), map()) :: {:ok, map()}

Lists the agents.

stream(scope, input)

@spec stream(Wardrik.Scope.t(), map()) ::
  {:ok, Enumerable.t()} | {:error, Wardrik.Error.t()}

Streams the agents' events as {event, cursor}. Reads what's there, then follows new events.