Skip to main content

Crate rumtk_core

Crate rumtk_core 

Source

Modules§

cache
cli
core
dependencies
hash
id
json
log
maths
net
pipelines
scripting
search
strings
threading
types

Macros§

rumtk_async_sleep
Sleep for some duration of time in an async context. Meaning, we can be awaited.
rumtk_cache_fetch
Searches for item in global cache. If global cache lacks item, create item using factory function passed to this macro.
rumtk_cache_get
Retrieves the cached item in immutable mode.
rumtk_cache_push
Overrides contents in cache at key K. No checks are performed for the existence of the key in the cache. Be careful not to override necessary data.
rumtk_connect
This macro is a convenience macro that allows you to establish a connection to an endpoint. It creates and instance of [tcp::RUMClientHandle].
rumtk_create_server
Macro for creating a server instance.
rumtk_create_task
This macro creates an async body that calls the async closure and awaits it.
rumtk_create_task_args
Creates an instance of SafeTaskArgs with the arguments passed.
rumtk_critical_section_read
Using a standard spin lock SafeLock, lock it and execute the critical section. The critical section itself is a synchronous function or closure. In this case, the critical section simply retrieves a value from a guarded dataset.
rumtk_critical_section_write
Using a standard spin lock SafeLock, lock it and execute the critical section. The critical section itself is a synchronous function or closure. In this case, the critical section attempts to modify the internal state of a guarded dataset.
rumtk_deserialize
Deserialization macro which will take a JSON string representation and return an instance of the specified type.
rumtk_exec_task
Convenience macro for packaging the task components and launching the task in one line.
rumtk_generate_id
rumtk_get_ip_port
Convenience macro for obtaining the ip and port off a string with format ip:port.
rumtk_init_threads
First, let’s make sure we have tokio initialized at least once. The runtime created here will be saved to the global context so the next call to this macro will simply grab a reference to the previously initialized runtime.
rumtk_lock_read
Framework interface to obtain a read guard to the locked data. To access the internal data, you will need to dereference the guard (*guard).
rumtk_lock_write
Framework interface to obtain a write guard to the locked data. To access the internal data, you will need to dereference the guard (*guard).
rumtk_new_lock
Creates a new safe lock to guard the given data. This interface was created to cleanup lock management for consumers of framework!
rumtk_new_task_queue
rumtk_pipeline_command
Creates a pipeline command out of the provided parameters. Parameters include path, args, and env. The command has RUMCommand.
rumtk_pipeline_run
Given a series of RUMCommand passed to this macro, prepare and execute the commands in a pipeline. A pipeline here refers to the Unix style pipeline which is the terminal form of a pipeline. The pipeline behaves like it would in the terminal => ls | wc.
rumtk_pipeline_run_async
Given a series of RUMCommand passed to this macro, prepare and execute the commands in a pipeline. A pipeline here refers to the Unix style pipeline which is the terminal form of a pipeline. The pipeline behaves like it would in the terminal => ls | wc.
rumtk_print_license_notice
Prints the mandatory GPL License Notice to terminal!
rumtk_python_exec
Execute the contents of a closure passed to this macro. This macro is an alias for [rumtk_core::scripting::python_utils::py_exec].
rumtk_python_exec_module
Load a Python module and execute contents.
rumtk_read_stdin
Reads STDIN and unescapes the incoming message. Return this unescaped message.
rumtk_resolve_task
This macro awaits a future.
rumtk_resolve_task_from_async
rumtk_serialize
Serialization macro which will take an object instance decorated with [Serialize] trait from serde and return the JSON string representation.
rumtk_sleep
Sleep a duration of time in a sync context, so no await can be call on the result.
rumtk_spawn_task
Puts task onto the runtime queue.
rumtk_start_server
Macro for starting the server. When a server is created, it does not start accepting clients right away. You need to call this macro to do that or call [tcp::RUMServerHandle::start] directly.
rumtk_wait_on_task
Using the initialized runtime, wait for the future to resolve in a thread blocking manner!
rumtk_write_stdout
Writes RUMString or RUMBuffer to stdout.