stream

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2016 License: Apache-2.0 Imports: 6 Imported by: 9

Documentation

Overview

Package stream provides utility functions to consume Entry streams.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadEntries

func ReadEntries(r io.Reader) <-chan *spb.Entry

ReadEntries reads a stream of Entry protobufs from r.

func ReadJSONEntries

func ReadJSONEntries(r io.Reader) <-chan *spb.Entry

ReadJSONEntries reads a JSON stream of Entry protobufs from r.

Types

type EntryReader added in v0.0.22

type EntryReader func(func(*spb.Entry) error) error

EntryReader functions read a stream of entries, passing each to a handler function.

func NewJSONReader added in v0.0.22

func NewJSONReader(r io.Reader) EntryReader

NewJSONReader reads a JSON stream of Entry protobufs from r.

func NewReader added in v0.0.22

func NewReader(r io.Reader) EntryReader

NewReader reads a stream of Entry protobufs from r.

Jump to

Keyboard shortcuts

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