{"modulePath":"github.com/goplugin/plugin-libocr","version":"v0.1.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package ringbuffer\n\n## Types\n\n```go\ntype RingBuffer[T any] struct {\n\t// contains filtered or unexported fields\n}\n```\nRingBuffer implements a fixed capacity ringbuffer for items of type T\n\n```go\nfunc NewRingBuffer[T any](cap int) *RingBuffer[T]\n```\n\n```go\nfunc (rb *RingBuffer[T]) Length() int\n```\n\n```go\nfunc (rb *RingBuffer[T]) Peek() T\n```\nPeek at the front item. Panics if there isn't one.\n\n```go\nfunc (rb *RingBuffer[T]) Pop() T\n```\nPop front item. Panics if there isn't one.\n\n```go\nfunc (rb *RingBuffer[T]) Push(item T)\n```\nPush new item to back. If the additional item would lead to the capacity being exceeded, remove the front item first\n\n","path":"github.com/goplugin/plugin-libocr/offchainreporting2plus/internal/ocr3/protocol/ringbuffer","name":"ringbuffer","synopsis":"","isRedistributable":true}
