Skip to main content

Module native_raw

Module native_raw 

Source
Expand description

Raw native functions for services to use

This is the set of raw native functions (wasm imports). They are available for services to use directly, but we recommend using the Wrapped Native Functions instead.

Structs§

KvHandle

Enums§

KvMode

Functions§

abortMessage⚠
Abort with message
abortSubjective⚠
call⚠
Call a service, store the return value into result, and return the result size
checkoutSubjective⚠
clockTimeGet⚠
Gets the current value of a clock in nanoseconds.
commitSubjective⚠
exportHandles⚠
getCurrentAction⚠
Store the currently-executing action into result and return the result size
getKey⚠
Copy min(dest_size, key_size) bytes of the most-recent key into dest and return key_size
getRandom⚠
Fills a buffer with random bytes
getResult⚠
Copy min(dest_size, resultSize - offset) bytes from result + offset into dest and return resultSize
importHandles⚠
kvClose⚠
Closes a key-value database
kvGet⚠
Get a key-value pair, if any
kvGreaterEqual⚠
Get the first key-value pair which is greater than or equal to the provided key
kvLessThan⚠
Get the key-value pair immediately-before provided key
kvMax⚠
Get the maximum key-value pair which has key as a prefix
kvOpen⚠
Opens a key-value database
kvOpenAt⚠
Opens a subtree of a key-value database
kvPut⚠
Set a key-value pair
kvRemove⚠
Remove a key-value pair if it exists
setMaxCpuTime⚠
Sets the CPU timer to expire after the current transaction/query/callback context has run for a given number of nanoseconds. When the timer expires, the current context will be terminated. Setting the timeout replaces any previous timeout.
setRetval⚠
Set the currently-executing action’s return value
socketOpen⚠
Starts a new HTTP request
socketSend⚠
Send a message to a socket
socketSetFlags⚠
Change flags on a socket. The mask determines which flags are set.
writeConsole⚠
Write message to console