Grafana Plugin SDK for Rust
APACHE-2.0 License
Bot releases are hidden (Show)
DataService
trait has a new associated type, Query
, which corresponds to the type of the query sent from the frontend component of the plugin (the TQuery
type parameter of the frontend DatasourceApi
implementation). The backend SDK will attempt to deserialize the JSON into this struct, and it will be accessible on the query
property of each query in QueryDataRequest.queries
. Note that QueryDataRequest
is also now generic over this type. Within the DataService
trait, it is simplest to use Self::Query
to refer to the new type.Query = serde_json::Value
in DataService
.headers
field containing the allow-listed fields sent along with the request to CheckHealthRequest
(see the Go SDK PR for more details)type_
field containing the plugin type to DataSourceInstanceSettings
. This is equal to the plugin_id
field on PluginContext
. See the Go SDK PR for justification.backend::IntoHttpResponse
for http::Response<Vec<u8>>
.IntoOptField
blanket impl.Eq
(as well as just PartialEq
) for various structs across the crate.protoc
since we no longer need to compile proto definitions.Published by sd2k over 2 years ago
SubscribeStreamResponse
, PublishStreamResponse
CheckHealthResponse
, reducing the reliance of knowing what the arguments shouldCheckHealthResponse::new
, SubscribeStreamResponse::new
andPublishStreamResponse::new
methods have been deprecated in favour of their new,InitialData::from_json
now only takes the desired JSON Value
by reference rather than byPublished by sd2k over 2 years ago
grafana_plugin_sdk::arrow2
data
field to SubscribeStreamRequest
and SubscribeStreamResponse
,FieldType
and IntoFieldType
:
bool
SystemTime
chrono::Date
chrono::NaiveDate
chrono::NaiveDateTime
FieldType
and IntoFieldType
traits are now public. These are useful whenField
s.Request
and Response
structs in the backend part of the SDK as#[non_exhaustive]
since changes to those structs are largely outside of our control;Response
types now have new constructors which shoulddata
part of the SDK are also now non-exhaustive,Default
impls which can be used to create them.Clone
for various backend structs:
AppInstanceSettings
DataSourceInstanceSettings
PluginContext
Role
(is also now Copy
)TimeRange
User
Iter
associated type of backend::DataService
to Stream
, and updatequery_data
accordingly. This allows each inner query to be handledlive::Error
type is now an enum and provides more detail on failures.path
field of SubscribeStreamRequest
, RunStreamRequest
andPublishStreamRequest
are now live::Path
types rather than arbitrary strings.Published by sd2k almost 3 years ago
Initial release of the Grafana Plugin SDK for Rust.