Interface AsyncSunraClient

All Known Implementing Classes:
AsyncSunraClientImpl

public interface AsyncSunraClient
  • Method Details

    • subscribe

      <O> CompletableFuture<ai.sunra.client.Output<O>> subscribe(String endpointId, ai.sunra.client.SubscribeOptions<O> options)
    • queue

    • withConfig

      static AsyncSunraClient withConfig(@Nonnull ai.sunra.client.ClientConfig config)
      Create a new client instance with the provided configuration.
      Parameters:
      config - The client configuration.
      Returns:
      The new client instance.
    • withEnvCredentials

      static AsyncSunraClient withEnvCredentials()
      Create a new client instance with the credentials resolved from the `SUNRA_KEY` environment variable.
      Returns:
      The new client instance.
    • withProxyUrl

      static AsyncSunraClient withProxyUrl(@Nonnull String proxyUrl)
      Create a new client instance with the provided proxy URL. With this configuration all requests will be proxied through the provided URL and the sunra target url will be in a request header called `X-Sunra-Target-Url`.
      Parameters:
      proxyUrl - The proxy URL.
      Returns:
      The new client instance.