Skip to main content

Aggregator

Aggregates all requests into one big send request to deduplicate the request

Functions

new

Aggregator.new(
debugNamestring,
promiseBulkQuery({number}) → Promise<T>
) → Aggregator<T>

Creates a new aggregator that aggregates promised results together

SetMaxBatchSize

Aggregator:SetMaxBatchSize(maxBatchSizenumber) → ()

Sets the max batch size

Promise

Aggregator:Promise(idnumber) → Promise<T>

Observe

Aggregator:Observe(idnumber) → Observable<T>

Observes the aggregated data

Show raw api
{
    "functions": [
        {
            "name": "new",
            "desc": "Creates a new aggregator that aggregates promised results together",
            "params": [
                {
                    "name": "debugName",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "promiseBulkQuery",
                    "desc": "",
                    "lua_type": "({ number }) -> Promise<T>"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Aggregator<T>"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 26,
                "path": "src/aggregator/src/Shared/Aggregator.lua"
            }
        },
        {
            "name": "SetMaxBatchSize",
            "desc": "Sets the max batch size",
            "params": [
                {
                    "name": "maxBatchSize",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 47,
                "path": "src/aggregator/src/Shared/Aggregator.lua"
            }
        },
        {
            "name": "Promise",
            "desc": "",
            "params": [
                {
                    "name": "id",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Promise<T>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 58,
                "path": "src/aggregator/src/Shared/Aggregator.lua"
            }
        },
        {
            "name": "Observe",
            "desc": "Observes the aggregated data",
            "params": [
                {
                    "name": "id",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Observable<T>"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 83,
                "path": "src/aggregator/src/Shared/Aggregator.lua"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "Aggregator",
    "desc": "Aggregates all requests into one big send request to deduplicate the request",
    "source": {
        "line": 6,
        "path": "src/aggregator/src/Shared/Aggregator.lua"
    }
}