pipeline

package
v1.9.0-rc5 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: BSD-3-Clause Imports: 1 Imported by: 9

Documentation

Overview

Package pipeline provides functionality for hashing pipelines needed to create different flavors of merkelised representations of arbitrary data. The interface exposes an io.Writer and Sum method, for components to use as a black box. Within a pipeline, writers are chainable. It is up for the implementer to decide whether a writer calls the next writer. Implementers should always implement the Sum method and call the next writer's Sum method (in case there is one), returning its result to the calling context.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainWriter added in v0.3.0

type ChainWriter interface {
	ChainWrite(*PipeWriteArgs) error
	Sum() ([]byte, error)
}

ChainWriter is a writer in a pipeline. It is up to the implementer to decide whether a writer calls the next writer or not. Implementers should call the Sum method of the subsequent writer in case there exists one.

type Interface

type Interface interface {
	io.Writer
	Sum() ([]byte, error)
}

Interface exposes an `io.Writer` and `Sum` method, for components to use as a black box. Within a pipeline, writers are chainable. It is up for the implementer to decide whether a writer calls the next writer. Implementers should always implement the `Sum` method and call the next writer's `Sum` method (in case there is one), returning its result to the calling context.

type PipeWriteArgs added in v0.3.0

type PipeWriteArgs struct {
	Ref  []byte // reference, generated by bmt
	Key  []byte // encryption key
	Span []byte // always unecrypted span uint64
	Data []byte // data includes the span too, but it may be encrypted when the pipeline is encrypted
}

PipeWriteArgs are passed between different ChainWriters.

type PipelineFunc added in v0.3.0

type PipelineFunc func() ChainWriter

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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