mirror of https://github.com/tailscale/tailscale/
util/ringbuffer: rename to ringlog
I need a ringbuffer in the more traditional sense, one that has a notion of item removal as well as tail loss on overrun. This implementation is really a clearable log window, and is used as such where it is used. Updates #cleanup Updates tailscale/corp#31762 Signed-off-by: James Tucker <james@tailscale.com>pull/16970/head
parent
4b9a1a0087
commit
d42f0b6a21
@ -1,14 +1,14 @@
|
|||||||
// Copyright (c) Tailscale Inc & AUTHORS
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
// SPDX-License-Identifier: BSD-3-Clause
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
package ringbuffer
|
package ringlog
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"reflect"
|
"reflect"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRingBuffer(t *testing.T) {
|
func TestRingLog(t *testing.T) {
|
||||||
const numItems = 10
|
const numItems = 10
|
||||||
rb := New[int](numItems)
|
rb := New[int](numItems)
|
||||||
|
|
||||||
Loading…
Reference in New Issue