sink

package
v0.0.0-...-0e50cf9 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

sink package is responsible for holding logic associated with the sink - final result

Index

Constants

View Source
const (
	Precision    = 3  // number of float decimals
	FloatBitSize = 64 // bit size of floats
)

Variables

This section is empty.

Functions

func Merge

func Merge(ms ...map[string][]float64) map[string][]float64

Merge create a single map by combining all the given maps

Types

type Sink

type Sink struct {
	Pipes []*pipe.Pipe // the collection of Pipes whose values are incoming to the sink
	// contains filtered or unexported fields
}

Sink struct represents the final state of the whole plumbing system if the filename was not specified, i.e it is "", results.csv is assumed

func NewSink

func NewSink(fn string, p []*pipe.Pipe) (*Sink, error)

New returns a new instance of a Sink

func (*Sink) Collect

func (s *Sink) Collect()

Collect gets all the data from the Pipes that are connected to this sink

func (*Sink) Dump

func (s *Sink) Dump() error

Dump tries to create the CSV file named filename with the results of the sink

Jump to

Keyboard shortcuts

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