Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove more constraints from default_main. #105

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions rust-connector-sdk/src/default_main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ use axum::{
use axum_extra::extract::WithRejection;
use clap::{Parser, Subcommand};
use prometheus::Registry;
use serde::Serialize;
use tower_http::{trace::TraceLayer, validate_request::ValidateRequestHeaderLayer};

use ndc_client::models::{
Expand Down Expand Up @@ -151,7 +150,7 @@ where
/// - Logs are written to stdout
pub async fn default_main<C: Connector + 'static>() -> Result<(), Box<dyn Error + Send + Sync>>
where
C::Configuration: Clone + Serialize,
C::Configuration: Clone,
C::State: Clone,
{
let CliArgs { command } = CliArgs::parse();
Expand All @@ -168,8 +167,8 @@ async fn serve<C: Connector + 'static>(
serve_command: ServeCommand,
) -> Result<(), Box<dyn Error + Send + Sync>>
where
C::Configuration: Serialize + Clone,
C::State: Sync + Send + Clone,
C::Configuration: Clone,
C::State: Clone,
{
init_tracing(&serve_command.service_name, &serve_command.otlp_endpoint)
.expect("Unable to initialize tracing");
Expand Down Expand Up @@ -332,7 +331,7 @@ pub fn create_v2_router<C: Connector + 'static>(
service_token_secret: Option<String>,
) -> Router
where
C::Configuration: Clone + Serialize,
C::Configuration: Clone,
C::State: Clone,
{
Router::new()
Expand Down
Loading