mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
Centralizes configuration, eliminates unnecessary copying of config
This commit is contained in:
@@ -8,6 +8,7 @@ const Allocator = std.mem.Allocator;
|
||||
const log = @import("../log.zig");
|
||||
const App = @import("../App.zig");
|
||||
const Http = @import("../http/Http.zig");
|
||||
const Config = @import("../Config.zig");
|
||||
const telemetry = @import("telemetry.zig");
|
||||
|
||||
const URL = "https://telemetry.lightpanda.io";
|
||||
@@ -55,7 +56,7 @@ pub const LightPanda = struct {
|
||||
self.connection.deinit();
|
||||
}
|
||||
|
||||
pub fn send(self: *LightPanda, iid: ?[]const u8, run_mode: App.RunMode, raw_event: telemetry.Event) !void {
|
||||
pub fn send(self: *LightPanda, iid: ?[]const u8, run_mode: Config.RunMode, raw_event: telemetry.Event) !void {
|
||||
const event = try self.mem_pool.create();
|
||||
event.* = .{
|
||||
.iid = iid,
|
||||
@@ -130,7 +131,7 @@ pub const LightPanda = struct {
|
||||
|
||||
const LightPandaEvent = struct {
|
||||
iid: ?[]const u8,
|
||||
mode: App.RunMode,
|
||||
mode: Config.RunMode,
|
||||
event: telemetry.Event,
|
||||
node: std.DoublyLinkedList.Node,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user