Skip to content

Commit

Permalink
blsforme/entry: Allow extension using custom cmdline snippet
Browse files Browse the repository at this point in the history
Signed-off-by: Ikey Doherty <ikey@serpentos.com>
  • Loading branch information
ikeycode committed Jan 2, 2025
1 parent cc7698c commit 21bb3bf
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions blsforme/src/entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ impl<'a> Entry<'a> {
}
}

/// With the given cmdline entry
/// Used by moss to inject a `moss.tx={}` parameter
pub fn with_cmdline(self, entry: CmdlineEntry) -> Self {
let mut cmdline = self.cmdline;
cmdline.push(entry);
Self { cmdline, ..self }
}

/// Return an entry ID, suitable for `.conf` generation
pub fn id(&self, schema: &Schema) -> String {
// TODO: For BLS schema, grab something even uniquer (TM)
Expand Down

0 comments on commit 21bb3bf

Please sign in to comment.