Expand description
A utility module containing everything needed to write a plugin, just write use hipcheck_sdk::prelude::*.
Re-exports§
pub use crate::error::ConfigError;pub use crate::error::Error;pub use crate::error::Result;pub use crate::DynQuery;pub use crate::NamedQuery;pub use crate::Plugin;pub use crate::Query;pub use crate::QuerySchema;pub use crate::QueryTarget;pub use crate::deps::*;
Macros§
- queries
macros - Generates an implementation of the
Plugin::queries()trait function using all previously-expanded#[query]attribute macros. Due to Rust’s macro expansion ordering, all#[query]functions must come before this macro to ensure they are seen and added.
Structs§
- Mock
Responses mock_engine - A map of query endpoints to mock return values.
- Plugin
Engine - Manages a particular query session.
- Plugin
Server - Runs the Hipcheck plugin protocol based on the user’s implementation of the
Plugintrait. - Query
Builder - Used for building a up a
Vecof keys to send to specific hipcheck plugin
Enums§
Type Aliases§
- Query
Result - The result of running a query, where the error is of the type
tonic::Status.
Attribute Macros§
- query
macros - An attribute on a function that creates an associated struct that implements
the Hipcheck Rust SDK’s
Querytrait. The function must have the signaturefn(&mut PluginEngine, content: impl serde::Deserialize) -> hipcheck_sdk::Result<impl serde::Serialize>. The generated struct’s name is the pascal-case version of the function name (e.g.do_something()->DoSomething).