Help us shape the future of Go! Take the 2026 Go Developer Survey

circbufsync

package
v0.11.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2023 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package circbufsync wraps armon/circbuf to be safe for concurrent read/write operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Buffer implements a subset of the *circbuf.Buffer methods where each exposed method is safe for concurrent read/write access.

func New

func New(buf *circbuf.Buffer) *Buffer

New creates a new synced circbuf.Buffer.

func (*Buffer) Bytes

func (b *Buffer) Bytes() []byte

Bytes mimics circbuf.Buffer

func (*Buffer) Write

func (b *Buffer) Write(p []byte) (int, error)

Bytes mimics circbuf.Write

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL