ioswmr

package module
v0.0.0-...-044b0c3 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 4 Imported by: 0

README

ioswmr

A Single Writer Multiple Readers for IO Stream

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer interface {
	io.Writer
	io.ReaderAt
}

Buffer is an interface that represents a buffer.

type SWMR

type SWMR interface {
	io.Writer
	io.Closer
	NewReader() io.Reader
}

SWMR is a single-writer-multiple-reader interface that allows for a single writer and multiple readers to access the same stream.

func NewSWMR

func NewSWMR(buf Buffer) SWMR

NewSWMR returns a new SWMR with a buffer. If the buffer is nil, it will use the memory buffer.

Jump to

Keyboard shortcuts

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