io

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Implements IO primitives

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AtomicDelimitedWriter

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

AtomicDelimitedWriter writes delimited proto messages synchronized

func NewAtomicDelimitedWriter

func NewAtomicDelimitedWriter(w *delimited.Writer) *AtomicDelimitedWriter

NewAtomicDelimitedWriter takes a delimited.WriterAtomic and returns an atomic version

func (*AtomicDelimitedWriter) PutProto

func (a *AtomicDelimitedWriter) PutProto(pb proto.Message) error

PutProto writes a protocol buffer into the writer and returns an error

type CSVWriter

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

func NewCSVWriter

func NewCSVWriter(w io.Writer) *CSVWriter

func (*CSVWriter) Close

func (w *CSVWriter) Close() error

func (*CSVWriter) WriteHeader

func (w *CSVWriter) WriteHeader(msg proto.Message) (int, error)

func (*CSVWriter) WriteRecord

func (w *CSVWriter) WriteRecord(msg proto.Message) (int, error)

type ChanWriter

type ChanWriter struct {
	// contains filtered or unexported fields
}

chanWriter writes into a []byte chan

func NewChanWriter

func NewChanWriter() *ChanWriter

TODO make chan buf size configurable

func (*ChanWriter) Chan

func (w *ChanWriter) Chan() <-chan []byte

func (*ChanWriter) Close

func (w *ChanWriter) Close() error

func (*ChanWriter) Write

func (w *ChanWriter) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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