observationtest

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IOReader

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

IOReader provides a mock reader that returns the provided error when calling read.

func NewIOReader

func NewIOReader(err error) *IOReader

NewIOReader returns a new instance of CSVReader for the given error.

func (*IOReader) Read

func (reader *IOReader) Read(p []byte) (n int, err error)

Read returns the configured error.

type Reader

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

Reader is a reader that returns the given observations and error on read.

func NewReader

func NewReader(observations []*observation.Observation, error error) *Reader

NewReader provides a reader that returns the given observations and error on read.

func (*Reader) Read

func (reader *Reader) Read() (*observation.Observation, error)

Read an observation from the mocked observations.

Jump to

Keyboard shortcuts

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