mirror of
https://github.com/katanemo/plano.git
synced 2026-06-17 15:25:17 +02:00
remove dead code
This commit is contained in:
parent
4a635cc6e4
commit
c4a3ff2284
2 changed files with 7 additions and 37 deletions
|
|
@ -7,7 +7,7 @@ static_resources:
|
|||
address:
|
||||
socket_address:
|
||||
address: 0.0.0.0
|
||||
port_value: 9000
|
||||
port_value: 10000
|
||||
traffic_direction: INBOUND
|
||||
filter_chains:
|
||||
- filters:
|
||||
|
|
@ -40,10 +40,6 @@ static_resources:
|
|||
path: "/var/log/access_ingress.log"
|
||||
route_config:
|
||||
name: local_routes
|
||||
request_headers_to_add:
|
||||
- header:
|
||||
key: "x-envoy-force-trace"
|
||||
value: "true"
|
||||
virtual_hosts:
|
||||
- name: local_service
|
||||
domains:
|
||||
|
|
@ -64,7 +60,7 @@ static_resources:
|
|||
address:
|
||||
socket_address:
|
||||
address: 0.0.0.0
|
||||
port_value: 10000
|
||||
port_value: 10001
|
||||
traffic_direction: INBOUND
|
||||
filter_chains:
|
||||
- filters:
|
||||
|
|
@ -97,10 +93,6 @@ static_resources:
|
|||
path: "/var/log/access_ingress_prompt.log"
|
||||
route_config:
|
||||
name: local_routes
|
||||
request_headers_to_add:
|
||||
- header:
|
||||
key: "x-envoy-force-trace"
|
||||
value: "true"
|
||||
virtual_hosts:
|
||||
- name: local_service
|
||||
domains:
|
||||
|
|
@ -192,10 +184,6 @@ static_resources:
|
|||
path: "/var/log/access_internal.log"
|
||||
route_config:
|
||||
name: local_routes
|
||||
request_headers_to_add:
|
||||
- header:
|
||||
key: "x-envoy-force-trace"
|
||||
value: "true"
|
||||
virtual_hosts:
|
||||
- name: local_service
|
||||
domains:
|
||||
|
|
@ -268,10 +256,6 @@ static_resources:
|
|||
path: "/var/log/access_llm.log"
|
||||
route_config:
|
||||
name: local_routes
|
||||
request_headers_to_add:
|
||||
- header:
|
||||
key: "x-envoy-force-trace"
|
||||
value: "true"
|
||||
virtual_hosts:
|
||||
- name: local_service
|
||||
domains:
|
||||
|
|
@ -470,7 +454,7 @@ static_resources:
|
|||
address:
|
||||
socket_address:
|
||||
address: 0.0.0.0
|
||||
port_value: 10000
|
||||
port_value: 10001
|
||||
hostname: arch_prompt_gateway_listener
|
||||
|
||||
- name: arch_llm_listener
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
use std::{collections::HashMap, fmt::Write, time::Duration};
|
||||
use std::{collections::HashMap, time::Duration};
|
||||
|
||||
use common::{
|
||||
common_types::{
|
||||
|
|
@ -16,12 +16,10 @@ use common::{
|
|||
http::{CallArgs, Client},
|
||||
};
|
||||
use http::StatusCode;
|
||||
use log::{debug, info, trace, warn};
|
||||
use log::{debug, trace, warn};
|
||||
use proxy_wasm::{traits::HttpContext, types::Action};
|
||||
use serde_json::Value;
|
||||
|
||||
use rand::{distributions::Alphanumeric, thread_rng, Rng};
|
||||
|
||||
use crate::stream_context::{ResponseHandlerType, StreamCallContext, StreamContext};
|
||||
|
||||
// HttpContext is the trait that allows the Rust code to interact with HTTP objects.
|
||||
|
|
@ -56,8 +54,8 @@ impl HttpContext for StreamContext {
|
|||
self.request_id = self.get_http_request_header(REQUEST_ID_HEADER);
|
||||
self.traceparent = self.get_http_request_header(TRACE_PARENT_HEADER);
|
||||
if self.traceparent.is_none() {
|
||||
// let trace_id: String = generate_random_hex_string(16);
|
||||
// self.set_http_request_header("x-client-trace-id", Some(trace_id.as_str()));
|
||||
// let trace_id: String = generate_random_hex_string(16);
|
||||
// self.set_http_request_header("x-client-trace-id", Some(trace_id.as_str()));
|
||||
}
|
||||
// let trace_id: String = generate_random_hex_string(16);
|
||||
|
||||
|
|
@ -389,15 +387,3 @@ impl HttpContext for StreamContext {
|
|||
Action::Continue
|
||||
}
|
||||
}
|
||||
|
||||
fn generate_random_hex_string(len: usize) -> String {
|
||||
let mut rng = thread_rng();
|
||||
let mut hex_string = String::with_capacity(len);
|
||||
|
||||
for _ in 0..len {
|
||||
let byte = rng.gen::<u8>();
|
||||
write!(&mut hex_string, "{:02x}", byte).unwrap();
|
||||
}
|
||||
|
||||
hex_string
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue