Skip to content

Commit b708db7

Browse files
implement set_target for SendData (#1134)
1 parent 4aa5d01 commit b708db7

File tree

1 file changed

+9
-0
lines changed
  • datadog-trace-utils/src/send_data

1 file changed

+9
-0
lines changed

datadog-trace-utils/src/send_data/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,15 @@ impl SendData {
205205
self.retry_strategy = retry_strategy;
206206
}
207207

208+
/// Overrides the set target Endpoint.
209+
///
210+
/// # Arguments
211+
///
212+
/// * `endpoint`: The new endpoint to be used.
213+
pub fn set_target(&mut self, endpoint: Endpoint) {
214+
self.target = endpoint;
215+
}
216+
208217
/// Sends the data to the target endpoint.
209218
///
210219
/// # Returns

0 commit comments

Comments
 (0)