FunctionInvocation
Function invocation over the function protocol, plus the invocation cache.
Function invocation over the function protocol, plus the invocation cache.
Service builder.FunctionInvocation, 4 rpcs.
GetCacheStats(GetCacheStatsRequest) -> GetCacheStatsResponse
Request: GetCacheStatsRequest
message GetCacheStatsRequest {
// no fields
}Response: GetCacheStatsResponse
message GetCacheStatsResponse {
repeated FunctionCacheStats functions = 1;
}| Field | |
|---|---|
functions | One entry per function name with cached results. |
ClearCache(ClearCacheRequest) -> ClearCacheResponse
Request: ClearCacheRequest
message ClearCacheRequest {
repeated string function_names = 1;
}| Field | |
|---|---|
function_names | Function names to clear. Empty → clear the entire cache. |
Response: ClearCacheResponse
message ClearCacheResponse {
optional uint64 removed = 1;
}| Field | |
|---|---|
removed | number of cache nodes removed |
Invoke(InvokeRequest) -> stream TaskEvent
Invoke a registered function (Cid → Cid). The node discovers providers in the DHT and recursively dispatches nested calls; every call in the tree emits a TaskEvent, ending with a terminal event or a gRPC error status.
Request: InvokeRequest
message InvokeRequest {
optional string name = 1;
optional string input = 2;
optional string owner_kind = 3;
optional string owner_id = 4;
optional bool no_cache = 5;
}| Field | |
|---|---|
name | function name |
input | input CID (string form) |
owner_kind | Optional owner (kind + id) to tag the invocation and any pods it spawns (via pod.dag), so they link back to the driving build/deployment/run and are cleaned up when it's removed. Empty = untagged. |
owner_id | |
no_cache | Skip the invocation-cache lookup for this invocation and everything it nests: every function genuinely re-runs. Fresh results are still stored, so a no-cache build repopulates the cache rather than fighting it. This is the safe way to force a cold build — unlike clearing the cache, it deletes nothing shared. |
Response: TaskEvent
TaskEvent, shared with other services.
ListFunctions(ListFunctionsRequest) -> ListFunctionsResponse
List the functions this node knows about — its locally-registered functions, each optionally annotated with the number of DHT providers. Note: the DHT keys functions by a hash of their name, so functions only ever provided by other peers (whose names this node has never seen) cannot be enumerated; the dropdown reflects the local registry.
Request: ListFunctionsRequest
message ListFunctionsRequest {
optional bool with_providers = 1;
}| Field | |
|---|---|
with_providers | When true, query the DHT for each function's provider count (slower). |
Response: ListFunctionsResponse
message ListFunctionsResponse {
repeated FunctionInfo functions = 1;
}Types used above
FunctionCacheStats
message FunctionCacheStats {
optional string function_name = 1;
optional uint64 active = 2;
optional uint64 expired = 3;
}| Field | |
|---|---|
function_name | |
active | unexpired cached entries |
expired | expired cached entries |
FunctionInfo
message FunctionInfo {
optional string name = 1;
optional string kind = 2;
optional bool local = 3;
optional uint32 provider_count = 4;
}| Field | |
|---|---|
name | |
kind | "build" | "deployment-method" | "content-provider" | … (function kind). |
local | Whether this node has the function in its in-process registry. |
provider_count | Number of DHT providers advertising this name (0 if not queried). |
Cluster
etcd-backed cluster state for distributed pinning: membership, pins, the caller's refs, and the GC epoch.
CidMap
── CID map ───────────────────────────────────────────────────────────────── The persistent key → CID map (docs/cid-map.md): tenant-scoped entries with TTL, pins and GC rooting, converging by newer-entry-wins. The tenant is inferred from the request's TenantId extension; callers never pass it. This service is the inspection/edit surface (UI + CLI); subsystems (sealed log streams, …) write their entries in-process.