bundler

package
v1.20.2 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStopBlockReached = errors.New("stop block reached")

Functions

func CSVEncode

func CSVEncode(message map[string]string) ([]byte, error)

func JSONLEncode

func JSONLEncode(message proto.Message) ([]byte, error)

Types

type Bundler

type Bundler struct {
	*shutter.Shutter

	Header        []byte
	HeaderWritten bool
	// contains filtered or unexported fields
}

func New

func New(
	size uint64,
	stopBlock uint64,
	boundaryWriter writer.Writer,
	outputStore dstore.Store,
	zlogger *zap.Logger,
	header []byte,
) (*Bundler, error)

func (*Bundler) Close

func (b *Bundler) Close()

func (*Bundler) Launch

func (b *Bundler) Launch(ctx context.Context)

func (*Bundler) Roll

func (b *Bundler) Roll(ctx context.Context, blockNum uint64) (rolled bool, err error)

func (*Bundler) Start

func (b *Bundler) Start(blockNum uint64) error

func (*Bundler) TrackBlockProcessDuration

func (b *Bundler) TrackBlockProcessDuration(elapsed time.Duration)

func (*Bundler) Writer

func (b *Bundler) Writer() writer.Writer

type Encoder

type Encoder func(proto.Message) ([]byte, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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