This commit is contained in:
nora 2024-04-10 21:52:23 +02:00
parent 18a9d610cd
commit 41e578e199
4 changed files with 14 additions and 6 deletions

12
src/framework.rs Normal file
View file

@ -0,0 +1,12 @@
pub trait DataSource {
fn schema(&self);
fn read(&self) -> DResult<()>;
}
pub struct Diagnostics {
}
pub type DResult<T> = Result<T, Diagnostics>;
fn _data_source_obj_safe(_: &dyn DataSource) {}

View file

@ -1,6 +1,7 @@
mod cert;
mod server;
mod values;
mod framework;
use std::{env, path::PathBuf};

View file

@ -208,7 +208,7 @@ impl Provider for MyProvider {
&self,
request: Request<tfplugin6::read_data_source::Request>,
) -> Result<Response<tfplugin6::read_data_source::Response>, Status> {
tracing::error!("read_data_source");
tracing::info!("read_data_source");
let reply = tfplugin6::read_data_source::Response {
state: Some(tfplugin6::DynamicValue {

View file

@ -17,11 +17,6 @@ impl Type {
}
}
pub struct DynamicValue {
msgpack: Option<Vec<u8>>,
json: Option<Vec<u8>>,
}
// this is very dumb and wrong
pub enum Value {
String(String),