xio

package
v0.0.0-...-361631d Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PrefixSuffixWriter

type PrefixSuffixWriter struct {
	W io.Writer
	// N is the max size of the prefix or suffix. The total number of bytes
	// retained is N*2.
	N int
	// contains filtered or unexported fields
}

PrefixSuffixWriter wraps an io.Writer such that the output is limited to a certain number of bytes. Flush must be called in order to write the suffix to the underlying writer.

func (*PrefixSuffixWriter) Flush

func (p *PrefixSuffixWriter) Flush() error

Flush flushes the suffix to the underlying writer.

func (*PrefixSuffixWriter) Write

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

type SyncWriter

type SyncWriter struct {
	W io.Writer
	// contains filtered or unexported fields
}

SyncWriter synchronizes concurrent writes to an underlying writer.

func (*SyncWriter) Write

func (sw *SyncWriter) Write(b []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳