squash

package
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(name string, factory FactoryFunc)

Register adds a squasher plugin under the given URL scheme, the same way dauth plugins register as "null", "trust", "grpc", "secret".

Types

type Client

type Client interface {
	Squash(ctx context.Context, req Request) (*Result, error)
}

func New

func New(config string, logger *zap.Logger) (Client, error)

New constructs a squasher Client from a plugin DSN. Empty or local:// keeps in-process squashing (a nil Client).

type FactoryFunc

type FactoryFunc func(config string, logger *zap.Logger) (Client, error)

type Range

type Range struct {
	StartBlock        uint64
	ExclusiveEndBlock uint64
}

Range is one store segment to merge, [StartBlock, ExclusiveEndBlock).

type Request

type Request struct {
	ModuleName           string
	ModuleHash           string
	ModuleInitialBlock   uint64
	UpdatePolicy         pbsubstreams.Module_KindStore_UpdatePolicy
	ValueType            string
	StateStore           string
	StateStoreDefaultTag string
	Ranges               []Range
	StoreSizeLimit       uint64
}

Request is one store's squash run. Ranges are contiguous segments in order. The standalone squasher implements Client and maps Ranges onto SquashRequest.ranges (proto field 11). This module does not import that proto.

type Result

type Result struct {
	ExclusiveEndBlock uint64
	StoreSizeBytes    uint64
	LoadedExisting    bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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