pub struct Change {
pub kind: String,
pub title: String,
pub details: HashMap<String, Value>,
pub environment: Option<String>,
pub service: Option<String>,
pub actor: Option<String>,
pub url: Option<String>,
pub id: Option<String>,
pub occurred_at: Option<SystemTime>,
}Expand description
One change to record with record_change: a flag flip, a config edit, a
migration, a deploy of infrastructure. Build one with Change::new and set whichever optional
fields apply with struct update syntax:
use forge_ops_tracker::{context, Change};
forge_ops_tracker::record_change(Change {
details: context! {"flag" => "new_checkout", "enabled" => true},
actor: Some("alice@example.com".to_string()),
..Change::new("feature_flag", "Enabled new checkout for everyone")
});Fields§
§kind: StringOne of "feature_flag", "config", "migration", "dependency", "infrastructure",
"other"; anything else is sent as "other".
title: StringRequired; truncated to 200 characters. A blank title is dropped, since it can’t be stored.
details: HashMap<String, Value>§environment: Option<String>Defaults to Configuration.environment.
service: Option<String>§actor: Option<String>§url: Option<String>A link to the change itself: a pull request, a flag’s settings page. http or https.
id: Option<String>An idempotency key: recording the same id twice stores one change.
occurred_at: Option<SystemTime>Defaults to now.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Change
Auto Trait Implementations§
impl Freeze for Change
impl RefUnwindSafe for Change
impl Send for Change
impl Sync for Change
impl Unpin for Change
impl UnsafeUnpin for Change
impl UnwindSafe for Change
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more