pipe

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package pipe has functions for pipe channel handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(pipe chan interface{}, err error)

Close closes a pipe and optionally sends an error

func New

func New() chan interface{}

New creates a new pipe. A pipe is basically a channel.

func ReadErrors

func ReadErrors(pipe chan interface{}) []error

ReadErrors selects all received errors and returns them. This is helpful for synchronous migration functions.

func WaitAndRedirect

func WaitAndRedirect(pipe, redirectPipe chan interface{}, interrupt chan os.Signal) (ok bool)

WaitAndRedirect waits for pipe to be closed and redirects all messages from pipe to redirectPipe while it waits. It also checks if there was an interrupt send and will quit gracefully if yes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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