Expand description
The PDK High Level Framework.
The PDK High Level Framework is the foundation for writting single-threaded non-blocking filters as main building block for custom policies.
pdk::hl relies on a reduced portion of the Rust async ecosystem, due to the limitations
of the underlying WebAssembly platform and their single-threaded nature.
Despite being single-threaded, pdk::hl supports concurrent execution of
multiple incoming HTTP flows (Request/Response pairs).
Re-exports§
pub use super::bootstrap::LaunchError;pub use super::bootstrap::Launcher;pub use super::Configuration;pub use super::grpc;pub use super::timer;pub use crate::client::HttpClient;pub use crate::client::HttpClientError;pub use crate::client::HttpClientResponse;pub use crate::client::InvalidUri;pub use crate::client::Service;pub use crate::client::Uri;pub use crate::stream::PropertyAccessor;pub use crate::stream::StreamProperties;
Modules§
Structs§
- Body
Stream - Body
Stream Async Reader - Chunk
- Request
Body State - Body state of the Request state-machine.
- Request
Body Stream State - Request
Headers State - Headers state of the Request state-machine.
- Request
State - Initial state of the Request state-machine. This type is intended to be injected as a parameter in Request filters.
- Response
- An HTTP Response to be returned by Request filters.
- Response
Body State - Body state of the Response state-machine.
- Response
Body Stream State - Response
Headers State - Headers state of the Response state-machine.
- Response
State - Initial state of the Response state-machine. This type is intended to be injected as a parameter in Response filters.
Enums§
- Body
Error - The error for
BodyHandleroperations. - Flow
- Indicates whether the current Request will continue to upstream filters
or if an early
Responsemust break the current flow. This type is intended to be returned by Request filters. - Request
Data - Carries user data from Request filter to Response filter when possible and represents the three posible final statuses from a Request filter. This type is intended to be injected as a parameter in Response filters.
Traits§
- Body
Handler - A handler for accessing the body of the current HTTP Flow.
- Body
State - Abstract Body state of the HTTP Flow state-machine.
- Body
Stream State - Entity
State - Abstract initial state of the HTTP Flow state-machine.
- Headers
Body Handler - A handler for accessing the headers and body of the current HTTP Flow.
- Headers
Body State - Abstract HeadersBody state of the HTTP Flow state-machine.
- Headers
Handler - A handler for accessing the headers of the current HTTP Flow.
- Headers
State - Abstract Headers state of the HTTP Flow state-machine.
- Into
Body State - Abstract state of the HTTP Flow state-machine allowed to be moved into the Body state.
- Into
Body Stream State - Into
Flow - A value-to-value conversion that consumes the input value and converts it in a
Flow.
Functions§
- on_
request - Creates a Request filter from a handler.
- on_
response - Creates a Response filter from a handler.