Module dev_test.erl¶
Function Index¶
compute/3 | Example implementation of a compute handler. |
compute_test/0* | |
delay/3 | Does nothing, just sleeps Req/duration or 750 ms and returns the
appropriate form in order to be used as a hook. |
device_with_function_key_module_test/0* | Tests the resolution of a default function. |
increment_counter/3 | Find a test worker's PID and send it an increment message. |
index/3 | Example index handler. |
info/1 | Exports a default_handler function that can be used to test the handler resolution mechanism. |
info/3 | Exports a default_handler function that can be used to test the handler resolution mechanism. |
init/3 | Example init/3 handler. |
load/3 | Return a message with the device set to this module. |
mul/2 | Example implementation of an imported function for a WASM
executor. |
postprocess/3 | Set the postprocessor-called key to true in the HTTP server. |
restore/3 | Example restore/3 handler. |
restore_test/0* | |
snapshot/3 | Do nothing when asked to snapshot. |
test_func/1 | |
update_state/3 | Find a test worker's PID and send it an update message. |
Function Details¶
compute/3¶
compute(Msg1, Msg2, Opts) -> any()
Example implementation of a compute
handler. Makes a running list of
the slots that have been computed in the state message and places the new
slot number in the results key.
compute_test/0 *¶
compute_test() -> any()
delay/3¶
delay(Msg1, Req, Opts) -> any()
Does nothing, just sleeps Req/duration or 750
ms and returns the
appropriate form in order to be used as a hook.
device_with_function_key_module_test/0 *¶
device_with_function_key_module_test() -> any()
Tests the resolution of a default function.
increment_counter/3¶
increment_counter(Msg1, Msg2, Opts) -> any()
Find a test worker's PID and send it an increment message.
index/3¶
index(Msg, Req, Opts) -> any()
Example index handler.
info/1¶
info(X1) -> any()
Exports a default_handler function that can be used to test the handler resolution mechanism.
info/3¶
info(Msg1, Msg2, Opts) -> any()
Exports a default_handler function that can be used to test the handler resolution mechanism.
init/3¶
init(Msg, Msg2, Opts) -> any()
Example init/3
handler. Sets the Already-Seen
key to an empty list.
load/3¶
load(Base, X2, Opts) -> any()
Return a message with the device set to this module.
mul/2¶
mul(Msg1, Msg2) -> any()
Example implementation of an imported
function for a WASM
executor.
postprocess/3¶
postprocess(Msg, X2, Opts) -> any()
Set the postprocessor-called
key to true in the HTTP server.
restore/3¶
restore(Msg, Msg2, Opts) -> any()
Example restore/3
handler. Sets the hidden key Test/Started
to the
value of Current-Slot
and checks whether the Already-Seen
key is valid.
restore_test/0 *¶
restore_test() -> any()
snapshot/3¶
snapshot(Msg1, Msg2, Opts) -> any()
Do nothing when asked to snapshot.
test_func/1¶
test_func(X1) -> any()
update_state/3¶
update_state(Msg, Msg2, Opts) -> any()
Find a test worker's PID and send it an update message.