FluxbaseFunctions
//fluxbase-kotlin/io.github.nimbleflux.fluxbase.functions/FluxbaseFunctions
FluxbaseFunctions
Section titled “FluxbaseFunctions”[jvm]
class FluxbaseFunctions(http: FluxbaseHttpClient)
Edge Functions module — port of FluxbaseFunctions from sdk/src/functions.ts.
Invokes Fluxbase edge functions via POST /api/v1/functions/{name}/invoke.
Usage:
val result = client.functions.invoke<MyData>("my-fn", body = mapOf("key" to "value"), namespace = "wayli")Constructors
Section titled “Constructors”| FluxbaseFunctions | [jvm] constructor(http: FluxbaseHttpClient) |
Functions
Section titled “Functions”| Name | Summary |
|---|---|
| invoke | [jvm] inline suspend fun <reified T> invoke(name: String, body: Any? = null, method: String = "POST", namespace: String? = null, headers: Map<String, String> = emptyMap()): FluxbaseResponse<T> Invoke an edge function. Port of invoke() in functions.ts:77. |
| invokeJson | [jvm] suspend fun invokeJson(name: String, body: Any? = null, method: String = "POST", namespace: String? = null): FluxbaseResponse<JsonElement> Invoke a function returning raw JSON (for untyped responses). |