Added logbuffer helper package

This adds a small package which is used to store logs for other
binaries we're calling. It's an in-memory non-depleting ring buffer
capable of directly taking in a stream (for example from stdout).
For reliability it has bounded total memory consumption.
It offers a simple interface to get the last n log lines out.

Test Plan: Has 100% test coverage built-in

Bug: T667

X-Origin-Diff: phab/D442
GitOrigin-RevId: 32d5944650793b6cea8ec48a40ea4abb3944ad21
diff --git a/core/pkg/logbuffer/BUILD.bazel b/core/pkg/logbuffer/BUILD.bazel
new file mode 100644
index 0000000..a53cb7a
--- /dev/null
+++ b/core/pkg/logbuffer/BUILD.bazel
@@ -0,0 +1,15 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+
+go_library(
+    name = "go_default_library",
+    srcs = ["logbuffer.go"],
+    importpath = "git.monogon.dev/source/nexantic.git/core/pkg/logbuffer",
+    visibility = ["//visibility:public"],
+)
+
+go_test(
+    name = "go_default_test",
+    srcs = ["logbuffer_test.go"],
+    embed = [":go_default_library"],
+    deps = ["@com_github_stretchr_testify//require:go_default_library"],
+)