Interface AsyncSunraClient
-
Method Summary
Modifier and TypeMethodDescriptionqueue()<O> CompletableFuture<ai.sunra.client.Output<O>> static AsyncSunraClientwithConfig(ai.sunra.client.ClientConfig config) Create a new client instance with the provided configuration.static AsyncSunraClientCreate a new client instance with the credentials resolved from the `SUNRA_KEY` environment variable.static AsyncSunraClientwithProxyUrl(String proxyUrl) Create a new client instance with the provided proxy URL.
-
Method Details
-
subscribe
<O> CompletableFuture<ai.sunra.client.Output<O>> subscribe(String endpointId, ai.sunra.client.SubscribeOptions<O> options) -
queue
AsyncQueueClient queue() -
withConfig
Create a new client instance with the provided configuration.- Parameters:
config- The client configuration.- Returns:
- The new client instance.
-
withEnvCredentials
Create a new client instance with the credentials resolved from the `SUNRA_KEY` environment variable.- Returns:
- The new client instance.
-
withProxyUrl
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.
-