FalEx.Client (fal_ex v0.1.0)

View Source

The main client implementation for FalEx.

This module creates and manages the various sub-clients (queue, storage, streaming, realtime) and provides the core run/subscribe functionality.

Summary

Functions

Creates a new FalEx client with the given configuration.

Runs a fal endpoint synchronously.

Submits a request to the queue and subscribes to updates.

Types

t()

@type t() :: %FalEx.Client{
  config: FalEx.Config.t(),
  queue: FalEx.Queue.t(),
  realtime: FalEx.Realtime.t(),
  storage: FalEx.Storage.t(),
  streaming: FalEx.Streaming.t()
}

Functions

create(config)

@spec create(FalEx.Config.t()) :: t()

Creates a new FalEx client with the given configuration.

run(client, endpoint_id, opts \\ [])

@spec run(t(), FalEx.Types.endpoint_id(), keyword()) ::
  {:ok, FalEx.Types.result()} | {:error, term()}

Runs a fal endpoint synchronously.

subscribe(client, endpoint_id, opts \\ [])

@spec subscribe(t(), FalEx.Types.endpoint_id(), keyword()) ::
  {:ok, FalEx.Types.result()} | {:error, term()}

Submits a request to the queue and subscribes to updates.