sinker

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BLOCK_PROGRESS      = 1000
	LIVE_BLOCK_PROGRESS = 1
)

Variables

This section is empty.

Functions

func RegisterMetrics

func RegisterMetrics()

Types

type Config

type Config struct {
	DBLoader *mongo.Loader
	DBName   string

	DDL mongo.Tables

	UndoBufferSize     int
	LiveBlockTimeDelta time.Duration

	BlockRange       string
	Pkg              *pbsubstreams.Package
	OutputModule     *pbsubstreams.Module
	OutputModuleName string
	OutputModuleHash manifest.ModuleHash
	ClientConfig     *client.SubstreamsClientConfig
}

type MongoSinker

type MongoSinker struct {
	*shutter.Shutter

	DBLoader *mongo.Loader
	Tables   mongo.Tables

	Pkg              *pbsubstreams.Package
	OutputModule     *pbsubstreams.Module
	OutputModuleName string
	OutputModuleHash manifest.ModuleHash
	ClientConfig     *client.SubstreamsClientConfig

	UndoBufferSize  int
	LivenessTracker *sink.LivenessChecker
	// contains filtered or unexported fields
}

func New

func New(config *Config, logger *zap.Logger, tracer logging.Tracer) (*MongoSinker, error)

func (*MongoSinker) Run

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

func (*MongoSinker) Start

func (s *MongoSinker) Start(ctx context.Context) error

func (*MongoSinker) Stop

func (s *MongoSinker) Stop(ctx context.Context, err error)

Jump to

Keyboard shortcuts

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