Skip to content

Commit

Permalink
coding service
Browse files Browse the repository at this point in the history
  • Loading branch information
r0x committed Jul 11, 2023
1 parent bc48782 commit 1b546df
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ pub struct Service {

impl Service {

/// Get the health services, url `/v1/health/checks/:service_name`
pub fn get(&self, c: &Client, service_name: &str) -> Result<Vec<String>, Error> {
/// Get the health services, base on below API url
/// http://localhost:8500/v1/catalog/service/neon_broker
/// http://localhost:8500/v1/health/checks/neon_broker
pub fn get(&self, c: &Client, service_name: &str) -> Result<Vec<String>, dyn Error> {
let url = format!("http://{}:{}/v1/health/checks/{}", c.host, c.port, service_name);

Ok(vec![])
Expand Down
22 changes: 21 additions & 1 deletion src/vo.rs
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
/// Vo
/// Vo
pub struct Service {
node: String,
check_id: String,
name: String,
status: String,
notes: String,
output: String,
service_id: String,
service_name: String,
service_tags: String,
r#type: String,
interval: String,
timeout: String,
exposed_port: u64,
definition: String,
create_index: u64,
modify_index: u64,
}


0 comments on commit 1b546df

Please sign in to comment.