diff --git a/Cargo.lock b/Cargo.lock index f00f32ff..5e622db5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2246,6 +2246,8 @@ dependencies = [ "crossterm", "ratatui", "rocketmq-rust", + "serde", + "strum", "tokio", "tokio-stream", ] diff --git a/rocketmq-tui/Cargo.toml b/rocketmq-tui/Cargo.toml index ef2d7315..0166f697 100644 --- a/rocketmq-tui/Cargo.toml +++ b/rocketmq-tui/Cargo.toml @@ -20,3 +20,5 @@ tokio.workspace = true tokio-stream = { workspace = true } anyhow = { workspace = true } +serde = { workspace = true, features = ["derive"] } +strum = { workspace = true, features = ["derive"] } diff --git a/rocketmq-tui/src/action.rs b/rocketmq-tui/src/action.rs new file mode 100644 index 00000000..5052df0e --- /dev/null +++ b/rocketmq-tui/src/action.rs @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +use serde::Deserialize; +use serde::Serialize; +use strum::Display; + +#[derive(Debug, Clone, PartialEq, Serialize, Display, Deserialize)] +pub enum Action { + Quit, +} diff --git a/rocketmq-tui/src/main.rs b/rocketmq-tui/src/main.rs index 79ccc29d..5da107dc 100644 --- a/rocketmq-tui/src/main.rs +++ b/rocketmq-tui/src/main.rs @@ -18,6 +18,7 @@ #![allow(unused_mut)] #![allow(unused_variables)] +mod action; mod rocketmq_tui_app; mod ui;