multi

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package multi implements a threadsafe writer interface that multiplies its input to a map of writers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MapWriter

type MapWriter interface {
	Write(p []byte) (int, error)
	Add(w io.Writer) (size int)
	Remove(w io.Writer) (size int)
	Size() int
}

MapWriter is an interface to write to a map of Writers. Writers can be added and removed with the Add and Remove methods, while the Size method returns the current map size.

func NewMapWriter

func NewMapWriter() MapWriter

NewMapWriter creates a new MapWriter.

Jump to

Keyboard shortcuts

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