const std = @import("std"); /// The wire protocol exposed by an evaluated synchronization source. /// /// Jetstreams are derived from relays, so callers must not count them as /// independent votes when constructing the relay consensus denominator. pub const SourceType = enum { relay, jetstream, pub fn text(self: SourceType) []const u8 { return @tagName(self); } pub fn parse(value: []const u8) SourceType { return if (std.mem.eql(u8, value, "jetstream")) .jetstream else .relay; } };