Module prelude

Module prelude 

Source
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§

queriesmacros
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§

MockResponsesmock_engine
A map of query endpoints to mock return values.
PluginEngine
Manages a particular query session.
PluginServer
Runs the Hipcheck plugin protocol based on the user’s implementation of the Plugin trait.
QueryBuilder
Used for building a up a Vec of keys to send to specific hipcheck plugin

Enums§

Host

Type Aliases§

QueryResult
The result of running a query, where the error is of the type tonic::Status.

Attribute Macros§

querymacros
An attribute on a function that creates an associated struct that implements the Hipcheck Rust SDK’s Query trait. The function must have the signature fn(&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).