stream

package
v0.0.0-...-225c67d Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package stream provides coordination for readers and writers of live job output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(ctx context.Context, id string, job testbot.Job) (io.ReadCloser, error)

Get gets the output of job. The only errors it returns are from ctx.

The caller is responsible for closing the returned io.ReadCloser.

func Poll

func Poll(ctx context.Context, id string) testbot.Job

Poll waits until a request for id is available. If ctx becomes done before a request is available, Poll returns the zero Job.

func Send

func Send(id string, job testbot.Job, r io.ReadCloser)

Send sends r to a matching call to Get, if one is available. If successful, it reads from r, closes r, and then returns.

Types

This section is empty.

Jump to

Keyboard shortcuts

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