Crate ockam_node

Source
Expand description

This crate provides an implementation of an Ockam [Ockam][main-ockam-crate-link] Node and is intended for use by crates that provide features and add-ons to the main [Ockam][main-ockam-crate-link] library.

The main [Ockam][main-ockam-crate-link] crate re-exports types defined in this crate, when the "std" feature is enabled.

Re-exports§

pub use storage::database;
pub use tokio;

Modules§

api
Api helpers
callback
Callback utility
channel_types
MPSC channel type aliases
compat
Async Mutex and RwLock
debugger
Debugger
storage
Support for storing persistent values
workers
Helper workers A collection of utility workers for various use cases.

Macros§

migrate
Create a migrator given a path to sql script
retry
This macro wraps a function with retry calls to keep calling the function until the error “database is locked” is not raised anymore.

Structs§

Context
Context contains Node state and references to the runtime.
DelayedEvent
Allow to send message to destination address periodically after some delay Only one scheduled heartbeat allowed at a time Dropping this handle cancels scheduled heartbeat
Executor
Underlying Ockam node executor
MessageReceiveOptions
Full set of options to send_and_receive_extended function
MessageSendReceiveOptions
Full set of options to send_and_receive_extended function
NodeBuilder
Start a node with a custom setup configuration
NullWorker
A minimal worker implementation that does nothing
ProcessorBuilder
Start a Processor
WorkerBuilder
Start a Worker with a custom configuration

Enums§

ContextMode
Context mode depending on the fact if it’s attached to a Worker or a Processor
NodeError
Enumeration of error causes in ockam_node
NodeReason
Reasons why a generic Ockam Node operation has failed
RouterReason
Reasons why adding an external router has failed
WorkerReason
Reasons why a worker operation has failed
WorkerShutdownPriority
Higher value means the worker is shutdown earlier

Constants§

DEFAULT_TIMEOUT
A default timeout in seconds

Traits§

HasContext
This trait can be used to integrate transports into a node