Expand description
Common imports
Re-exports§
pub use crate::utils::TokioExecutor;
Structs§
- Middleware for adding some shareable value to [request data].
- A wrapper to keep count of the attempts tried by a task
BackendStream
is a wrapper around another streamS
. It controls the flow of the stream based on theController
state.- Stores the Workers context
- The
Controller
struct represents a thread-safe state manager. It usesAtomicUsize
for state to ensure safe concurrent access. Used to control polling - Extension data for tasks. This is commonly used to share state across tasks. or across layers within the same tasks
- A type map of protocol extensions.
- Tells the poller that the worker is ready for a new request
- An example of the basics of a backend
- In-memory queue that implements Stream
- A monitor for coordinating and managing a collection of workers.
- The internal context of a Monitor Usually shared with multiple workers
- The
Notify
struct encapsulates asynchronous, multi-producer, single-consumer (MPSC) channel functionality. It is used to send notifications of typeT
from multiple producers to a single consumer. - A poller type that allows fetching from a stream and a heartbeat future that can be used to do periodic tasks
- A worker that is ready for running
- Represents a job which can be serialized and executed
- An executable service implemented by a closure.
- A wrapper type that defines a task id.
- Represents a generic Worker that can be in many different states
- Allows building a
Worker
. Usually the output isWorker<Ready>
- A worker name wrapper usually used by Worker builder
Enums§
- Represents a general error returned by a task or by internals of the platform
- Events emitted by a worker
- Possible errors that can occur when starting a worker.
Traits§
- A backend represents a task source Both
Storage
andMessageQueue
need to implement it for workers to be able to consume tasks - This allows encoding and decoding of requests in different backends
- An Executor that is used to spawn futures
- Allows getting some type from the Request data
- Helper for Job Responses
- Trait representing a job.
- Trait representing a job.
- Represents a message queue that can be pushed and consumed.
- Helper trait for building new Workers from
WorkerBuilder
- Helper trait for building new Workers from
WorkerBuilder
Functions§
- A helper method to build functions
Type Aliases§
- Convenience type alias
- Represents a stream for T.
- The result of sa stream produced by a Storage