noop

package
v1.16.2 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

README

Noop Sink

The noop sink is a minimal sink implementation that receives very little data from the server but allows it to prepare the server-side cache, keeping it hot.

Purpose

The noop sink is designed for preparing the caches on the server, particularly when using stores

Features

  • Cursor Management: Saves and loads cursor state from a file
  • No Data Processing: Receives data but performs no operations on it
  • Minimal Resource Usage: Very lightweight operation
  • Statistics Reporting: Provides standard sink statistics

Usage

substreams sink noop [manifest] [module_name]
Flags
  • --state-file: File where the sink will store its cursor (default: ./state.cursor)
  • Standard substreams flags (endpoint, start-block, stop-block, etc.)

Configuration

The noop sink automatically enables noop-mode in the SinkerConfig, which tells the substreams server to not send actual data but only populate the cache

Example

# Run noop sink with default settings
substreams sink noop

# Run with custom manifest and state file
substreams sink noop ./my-substreams.yaml my_module --state-file ./noop.cursor

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sink

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

Sink represents a noop sink that only handles cursors without processing data

func NewSink

func NewSink(config SinkConfig) (*Sink, error)

NewSink creates a new noop sink

func (*Sink) PrintStats

func (s *Sink) PrintStats()

PrintStats prints final statistics

func (*Sink) Run

func (s *Sink) Run(ctx context.Context) error

Run starts the noop sink

type SinkConfig

type SinkConfig struct {
	StateFile    string
	SinkerConfig *sink.SinkerConfig
	Logger       *zap.Logger
}

SinkConfig holds configuration for the noop sink

Jump to

Keyboard shortcuts

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