George3d6 / Inquisitor

An easily extensible, minimal footprint monitoring tool. (Still in the testing phase)
BSD 2-Clause "Simplified" License
30 stars 4 forks source link

Lots of previously discussed things #52

Closed Deedasmi closed 6 years ago

Deedasmi commented 6 years ago

Have tossed a few more commits into this PR. Made a top level crate thing that makes the workspace work for agent and receptor, as well as some better error messages in the build.rs files

Deedasmi commented 6 years ago

There is an API change in here now. Apparently all you have to do to make a plugin return Self in a trait object is explicitly state it as sized. This does mean we can no longer return std::io::Error as an error right now, but we could make the new function generic and let people specify their errors or wait until we can return something like Result<impl AgentPlugin, impl Display> in traits.

George3d6 commented 6 years ago

I think the <Plugin, String> signature for new is more than enough, but I can't see how having <impl AgentPlugin, impl Display> as the return type would hurt either, if anything, it would make error handling less verbose.

Then again, further down the line it may help to have all errors standardized to be a String... but I can't think of any immediate or large future benefit from this.

For now I think merging this as-is should be fine.