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

[Merged by Bors] - chore: remove unnecessary dep in controlplane-metadata #3450

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/fluvio-controlplane-metadata/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ pub mod spu;
pub mod topic;
pub mod partition;
pub mod spg;
pub mod message;
pub mod smartmodule;
pub mod tableformat;
pub mod message;

pub use fluvio_stream_model::core;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::fmt::Debug;

use fluvio_protocol::{Encoder, Decoder};

use super::Message;
use super::msg_type::Message;

#[derive(Encoder, Decoder, Debug, Eq, PartialEq, Clone, Default)]
pub struct Messages<S> {
Expand Down
31 changes: 2 additions & 29 deletions crates/fluvio-controlplane-metadata/src/message/mod.rs
Original file line number Diff line number Diff line change
@@ -1,32 +1,5 @@
mod msg_type;
mod replica_msg;
mod messages;
mod msg_type;

pub use self::msg_type::MsgType;
pub use self::msg_type::Message;
pub use messages::*;

pub use self::replica_msg::{ReplicaMsgs, ReplicaMsg};
pub use self::smartmodule_msg::{SmartModuleMsgs, SmartModuleMsg};

pub use spu_msg::*;
pub use smartmodule_msg::*;

mod spu_msg {

use crate::spu::SpuSpec;

use super::Message;

pub type SpuMsg = Message<SpuSpec>;
}

mod smartmodule_msg {

use crate::smartmodule::SmartModule;

use super::{Message, Messages};

pub type SmartModuleMsg = Message<SmartModule>;
pub type SmartModuleMsgs = Messages<SmartModule>;
}
pub use msg_type::*;
19 changes: 4 additions & 15 deletions crates/fluvio-controlplane-metadata/src/message/msg_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ use std::fmt::Display;
use std::fmt;

use fluvio_protocol::{Encoder, Decoder};

use crate::store::actions::*;
use crate::core::*;
use crate::store::*;
use fluvio_stream_model::core::MetadataItem;
use fluvio_stream_model::core::Spec;
use fluvio_stream_model::store::MetadataStoreObject;
use fluvio_stream_model::store::actions::LSChange;

#[derive(Decoder, Default, Encoder, Debug, Eq, PartialEq, Clone)]
pub enum MsgType {
Expand Down Expand Up @@ -56,17 +56,6 @@ impl<C> Message<C> {
}
}

/*
impl<C> From<C> for Message<C>
where
C: Encoder + Decoder + Debug + Default,
{
fn from(content: C) -> Message<C> {
Message::update(content)
}
}
*/

impl<S, C, D> From<LSChange<S, C>> for Message<D>
where
S: Spec,
Expand Down
5 changes: 0 additions & 5 deletions crates/fluvio-controlplane-metadata/src/partition/mod.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
mod spec;
mod status;
mod policy;
mod replica;
pub mod store;

pub use self::spec::*;
pub use self::status::*;
pub use fluvio_protocol::record::ReplicaKey;
pub use self::policy::*;
pub use self::replica::*;

#[cfg(feature = "k8")]
mod k8;
Expand Down
24 changes: 0 additions & 24 deletions crates/fluvio-controlplane-metadata/src/partition/policy.rs

This file was deleted.

Loading
Loading