Skip to content

Commit

Permalink
reexport some crates
Browse files Browse the repository at this point in the history
  • Loading branch information
flearc authored and Forsworns committed Mar 3, 2024
1 parent 63d3b48 commit 184d239
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/datasources/apollo.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![allow(unreachable_code)]
use apollo_client::conf::{requests::WatchRequest, ApolloConfClientBuilder};
use sentinel_core::apollo_client::conf::{requests::WatchRequest, ApolloConfClientBuilder};
use sentinel_core::{
base,
datasource::{new_flow_rule_handler, rule_json_array_parser, ApolloDatasource},
Expand Down
2 changes: 1 addition & 1 deletion examples/datasources/consul.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![allow(unreachable_code)]
use consul::{kv::KVPair, kv::KV, Client, Config, QueryOptions};
use sentinel_core::consul::{kv::KVPair, kv::KV, Client, Config, QueryOptions};
use sentinel_core::{
base,
datasource::{ds_consul::ConsulDataSource, new_flow_rule_handler, rule_json_array_parser},
Expand Down
2 changes: 1 addition & 1 deletion examples/datasources/etcdv3.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![allow(unreachable_code)]
use etcd_rs::{Client, ClientConfig, PutRequest};
use sentinel_core::etcd_rs::{Client, ClientConfig, PutRequest};
use sentinel_core::{
base,
datasource::{ds_etcdv3::Etcdv3DataSource, new_flow_rule_handler, rule_json_array_parser},
Expand Down
4 changes: 2 additions & 2 deletions examples/datasources/k8s.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![allow(unreachable_code)]
use k8s_openapi::apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinition;
use kube::{
use sentinel_core::k8s_openapi::apiextensions_apiserver::pkg::apis::apiextensions::v1::CustomResourceDefinition;
use sentinel_core::kube::{
api::{Api, Patch, PatchParams, PostParams},
runtime::wait::{await_condition, conditions},
Client, CustomResourceExt,
Expand Down
14 changes: 13 additions & 1 deletion sentinel-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,23 @@ pub mod logging;
cfg_exporter! {
/// Metric Exporter implementations. Currently, only Prometheus is supported.
pub mod exporter;
pub extern crate prometheus_exporter;
}
cfg_datasource! {
/// Dynamic datasource support for Sentinel rule management.
/// Currently, k8s, etcd and consul are supported.
/// Currently, k8s, etcd, consul and apollo are supported.
pub mod datasource;
#[cfg(feature = "ds_etcdv3")]
pub extern crate etcd_rs;
#[cfg(feature = "ds_consul")]
pub extern crate consul;
#[cfg(feature = "ds_apollo")]
pub extern crate apollo_client;
}

cfg_k8s! {
pub extern crate k8s_openapi;
pub extern crate kube;
}
// Utility functions for Sentinel.
pub mod utils;
Expand Down

0 comments on commit 184d239

Please sign in to comment.