Skip to content
On this page

Athena.systems.streamer

Functions

registerCallback

Usage

Athena.systems.streamer.registerCallback<T>(key, callback, range?): Promise<void>

Register a custom callback function. When the key is updated with data it will come back through the callback.

Static

Type parameters

Name
T

Parameters

NameTypeDefault valueDescription
keystringundefinedA unique key for this stream data.
callback(player: Player, streamedData: T[]) => voidundefined
rangenumber100How far away should we look from the player's position.

Returns

Promise<void>

Defined in

server/systems/streamer.ts:145


updateData

Usage

Athena.systems.streamer.updateData<T>(key, array): Promise<void>

Populates Stream Data for External Process

Static

Type parameters

Name
T

Parameters

NameType
keystring
arrayT[]

Returns

Promise<void>

Defined in

server/systems/streamer.ts:190

Created by Stuyk | Est. 2020