Skip to content

Commit 275fdad

Browse files
authored
Merge pull request #35 from FeatureProbe/support_control_conf
Support toggle control conf of the client
2 parents 9eb93e1 + c527f42 commit 275fdad

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
edition = "2021"
33
name = "feature-probe-server-sdk"
4-
version = "1.2.10"
4+
version = "1.2.11"
55
license = "Apache-2.0"
66
authors = ["maintain@featureprobe.com"]
77
description = "FeatureProbe Server Side SDK for Rust"

src/evaluate.rs

+6
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ pub struct EvalParams<'a> {
135135
pub struct EvalDetail<T> {
136136
pub value: Option<T>,
137137
pub rule_index: Option<usize>,
138+
pub track_access_events: Option<bool>,
139+
pub last_modified: Option<u64>,
138140
pub variation_index: Option<usize>,
139141
pub version: Option<u64>,
140142
pub reason: String,
@@ -200,6 +202,8 @@ impl Toggle {
200202
variation_index: v.as_ref().map(|v| v.index),
201203
value: v.map(|v| v.value),
202204
version: Some(self.version),
205+
track_access_events: self.track_access_events,
206+
last_modified: self.last_modified,
203207
reason: "disabled".to_owned(),
204208
..Default::default()
205209
};
@@ -212,6 +216,8 @@ impl Toggle {
212216
value: Some(v.value),
213217
variation_index: Some(v.index),
214218
rule_index: Some(i),
219+
track_access_events: self.track_access_events,
220+
last_modified: self.last_modified,
215221
version: Some(self.version),
216222
reason: format!("rule {i}"),
217223
};

0 commit comments

Comments
 (0)