Remove async-traits
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
use async_trait::async_trait;
|
||||
use k8s_openapi::api::core::v1::Secret;
|
||||
use kube::runtime::events::{Event, EventType, Recorder, Reporter};
|
||||
use kube::{Resource, ResourceExt};
|
||||
@@ -26,7 +25,7 @@ impl Context {
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
#[allow(async_fn_in_trait)]
|
||||
pub trait ControllerEvents {
|
||||
type Error;
|
||||
|
||||
@@ -47,7 +46,6 @@ pub trait ControllerEvents {
|
||||
T: Resource<DynamicType = ()> + Sync;
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl ControllerEvents for Recorder {
|
||||
type Error = kube::Error;
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ mod service_user;
|
||||
use core::fmt;
|
||||
use std::sync::Arc;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use k8s_openapi::NamespaceResourceScope;
|
||||
use kube::runtime::controller::Action;
|
||||
use kube::runtime::finalizer;
|
||||
@@ -38,7 +37,6 @@ impl From<finalizer::Error<Self>> for Error {
|
||||
|
||||
type Result<T, E = Error> = std::result::Result<T, E>;
|
||||
|
||||
#[async_trait]
|
||||
trait Reconcile {
|
||||
async fn reconcile(self: Arc<Self>, ctx: Arc<Context>) -> Result<Action>;
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ use std::str::from_utf8;
|
||||
use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
|
||||
use async_trait::async_trait;
|
||||
use chrono::{DateTime, Utc};
|
||||
use k8s_openapi::api::core::v1::Secret;
|
||||
use k8s_openapi::apimachinery::pkg::apis::meta::v1::OwnerReference;
|
||||
@@ -76,7 +75,6 @@ fn format_username(name: &str, namespace: &str) -> String {
|
||||
format!("{name}.{namespace}")
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl Reconcile for ServiceUser {
|
||||
async fn reconcile(self: Arc<Self>, ctx: Arc<Context>) -> Result<Action> {
|
||||
let name = self
|
||||
|
||||
Reference in New Issue
Block a user