Skip to main content

Crate aiway_plugin

Crate aiway_plugin 

Source
Expand description

§aiway-plugin

网关插件 SDK,用于实现自定义插件。

Re-exports§

pub use bincode;
pub use http;
pub use serde_json;

Modules§

wasm_types
WASM 插件边界序列化类型

Macros§

export_wasm
导出 WASM 插件
log_debug
DEBUG日志
log_error
格式化日志宏(ERROR 级别)
log_info
INFO日志
log_trace
TRACE日志
log_warn
WARN日志

Structs§

Bytes
A cheaply cloneable and sliceable chunk of contiguous memory.
FormPart
Multipart 表单字段
HttpRequest
HTTP 请求参数
HttpRequestBuilder
HTTP 请求构建器
HttpResponse
HTTP 响应结果
PluginInfo
插件信息
Response
插件主动响应
Version
SemVer version as defined by https://semver.org.
WasmHttpContext
WASM 侧的插件上下文实现。

Enums§

Outcome
插件控制流
PluginError
插件错误类型

Constants§

LOG_DEBUG
LOG_ERROR
日志级别常量,与 WASM 侧和 Host 侧保持一致
LOG_INFO
LOG_TRACE
LOG_WARN

Traits§

Plugin
插件定义
PluginConfigExt
PluginContext
插件上下文接口

Functions§

block_on
简易 block_on,用于在同步上下文(WASM 内部)中执行 async 函数。

Type Aliases§

PluginResult

Attribute Macros§

async_trait