process

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Balancer added in v0.0.15

type Balancer struct {
	Context journal.Context
}

Balancer processes ASTs.

func (*Balancer) Process added in v0.0.15

func (pr *Balancer) Process(ctx context.Context, inCh <-chan *ast.Day, outCh chan<- *ast.Day) error

Process processes days.

type Error

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

Error is an error.

func (Error) Error

func (be Error) Error() string

type JournalSource added in v0.0.15

type JournalSource struct {
	Context journal.Context

	Path   string
	Expand bool
	Filter journal.Filter
}

JournalSource emits journal data in daily batches.

func (*JournalSource) Source added in v0.0.15

func (pr *JournalSource) Source(ctx context.Context, outCh chan<- *ast.Day) error

Source is a source of days.

type PeriodDiffer added in v0.0.15

type PeriodDiffer struct {
	Valuation *journal.Commodity
}

PeriodDiffer filters the incoming days according to the dates specified.

func (PeriodDiffer) Process added in v0.0.15

func (pf PeriodDiffer) Process(ctx context.Context, inCh <-chan *ast.Day, outCh chan<- *ast.Day) error

Process does the diffing.

type PeriodFilter

type PeriodFilter struct {
	From, To time.Time
	Interval date.Interval
	Last     int
}

PeriodFilter filters the incoming days according to the dates specified.

func (PeriodFilter) Process added in v0.0.15

func (pf PeriodFilter) Process(ctx context.Context, inCh <-chan *ast.Day, outCh chan<- *ast.Day) error

Process does the filtering.

type PriceUpdater

type PriceUpdater struct {
	Context   journal.Context
	Valuation *journal.Commodity
}

PriceUpdater updates the prices in a stream of days.

func (PriceUpdater) Process added in v0.0.15

func (pu PriceUpdater) Process(ctx context.Context, inCh <-chan *ast.Day, outCh chan<- *ast.Day) error

Process computes prices.

type Valuator

type Valuator struct {
	Context   journal.Context
	Valuation *journal.Commodity
}

Valuator produces valuated days.

func (*Valuator) Process added in v0.0.15

func (pr *Valuator) Process(ctx context.Context, inCh <-chan *ast.Day, outCh chan<- *ast.Day) error

Process computes prices.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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