syncbuf

package
v0.0.0-...-31509f8 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Syncbuf

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

Syncbuf implements a go-routine safe unbounded buffer

func New

func New() *Syncbuf

func (*Syncbuf) Bytes

func (s *Syncbuf) Bytes() []byte

Bytes() returns the current contents of the Syncbuf, without modifying it.

func (*Syncbuf) Read

func (s *Syncbuf) Read(b []byte) (n int, err error)

func (*Syncbuf) Write

func (s *Syncbuf) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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