Re-exports§
pub use ipc_types::Announce as ModuleAnnounce;
pub use ipc_types::AnnounceBlob;
pub use ipc_types::ClientRequest;
pub use ipc_types::Endpoint as AnnouncedEndpoint;
pub use ipc_types::EndpointAnnounce;
pub use ipc_types::GetSecretRequest;
pub use ipc_types::Init as OrchestratorInit;
pub use ipc_types::InitBlob;
pub use ipc_types::ListenAddress;
pub use ipc_types::ModuleToOrchestrator;
pub use ipc_types::OrchestratorToModule;
pub use ipc_types::RotatedNotification;
pub use ipc_types::RotationAckRequest;
pub use ipc_types::SecretValueResponse;
pub use ipc_types::ServerResponse;
pub use typed_secret::Secret;
pub use typed_secret::TypedSecretError;
pub use typed_secret::get_typed_secret;
pub use crate::secret_client::register_for_redaction;
pub use crate::secret_client::register_secret_for_redaction;
pub use model_manager::ModelManager;
Modules§
- build
- Module exposing build information constants.
- ipc_
types - model_
manager - prelude
- Prelude module, exposing the most commonly used items.
- secret_
client - secret_
provider - typed_
secret
Macros§
- instrument_
secret_ op - Creates an instrumented span for secret provider operations. Use this macro to wrap secret provider operations with proper tracing.
- json_
println - A convenience macro for writing to JsonStdout
- safe_
log - Log macro that redacts sensitive information before logging
- stderr
- A convenience macro for writing to stderr
Structs§
- AppState
- Shared application state for a PyWatt module.
- Module
Builder - Builder pattern for bootstrapping PyWatt modules.
Enums§
- Announce
Error - Errors that may occur when serializing or sending announcement
- Bootstrap
Error - Errors that may occur during bootstrap initialization.
- Error
- Unified error type for the SDK
- Init
Error - Errors that may occur while reading the initial handshake from stdin.
- Serve
Error - Errors that may occur during server bootstrap and run.
Functions§
- announce_
from_ router - bootstrap_
module - Bootstraps a PyWatt module with handshake, secret init, announcement, and IPC.
- eprint_
json - Print JSON to stderr.
- eprint_
pretty_ json - Print pretty JSON to stderr.
- get_
module_ secret_ client - Create a new SecretClient for the module, wired to stdin/stdout for IPC
- get_
secret - Retrieve a secret by key from the orchestrator, registering it for redaction
- get_
secrets - Retrieve multiple secrets by key, registering each for redaction.
- init_
module - Initialize stderr logging with JSON format and secret redaction.
- print_
json - Print JSON to stdout.
- print_
pretty_ json - Print pretty JSON to stdout.
- process_
ipc_ messages - Processes runtime IPC messages from the orchestrator over stdin.
- read_
init - Read the
Init
message sent by the orchestrator over stdin. - send_
announce - Send the module’s announcement blob to the orchestrator via stdout.
- serve_
module - Bootstraps and serves a PyWatt module with Axum router in one step.
- subscribe_
secret_ rotations - Subscribe to secret rotations for the given keys. The
on_rotate
callback will be invoked for each rotated key with the new value.
Type Aliases§
- Result
- Convenience result alias