mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 23:23:28 +00:00
Initial usage telemetry
This commit is contained in:
23
src/app.zig
Normal file
23
src/app.zig
Normal file
@@ -0,0 +1,23 @@
|
||||
const std = @import("std");
|
||||
|
||||
const Allocator = std.mem.Allocator;
|
||||
const Telemetry = @import("telemetry/telemetry.zig").Telemetry;
|
||||
|
||||
// Container for global state / objects that various parts of the system
|
||||
// might need.
|
||||
pub const App = struct {
|
||||
telemetry: Telemetry,
|
||||
|
||||
pub fn init(allocator: Allocator) !App {
|
||||
const telemetry = Telemetry.init(allocator);
|
||||
errdefer telemetry.deinit();
|
||||
|
||||
return .{
|
||||
.telemetry = telemetry,
|
||||
};
|
||||
}
|
||||
|
||||
pub fn deinit(self: *App) void {
|
||||
self.telemetry.deinit();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user