Help us shape the future of Go! Take the 2026 Go Developer Survey

index

package
v3.7.9 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: AGPL-3.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPartitionRevoked = errors.New("partition revoked")

Functions

func ObjectKey

func ObjectKey(ctx context.Context, object *dataobj.Object) (string, error)

ObjectKey generates the object key for storing an index object in object storage. This is a public wrapper around the generateObjectKey functionality.

Types

type Builder

type Builder struct {
	services.Service
	// contains filtered or unexported fields
}

func NewIndexBuilder

func NewIndexBuilder(
	cfg Config,
	mCfg metastore.Config,
	kafkaCfg kafka.Config,
	logger log.Logger,
	instanceID string,
	bucket objstore.Bucket,
	scratchStore scratch.Store,
	reg prometheus.Registerer,
) (*Builder, error)

type Calculator

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

Calculator is used to calculate the indexes for a logs object and write them to the builder. It reads data from the logs object in order to build bloom filters and per-section stream metadata.

func NewCalculator

func NewCalculator(indexobjBuilder *indexobj.Builder) *Calculator

func (*Calculator) Calculate

func (c *Calculator) Calculate(ctx context.Context, logger log.Logger, reader *dataobj.Object, objectPath string) error

Calculate reads the log data from the input logs object and appends the resulting indexes to calculator's builder. Calculate is not thread-safe.

func (*Calculator) Flush

func (c *Calculator) Flush() (*dataobj.Object, io.Closer, error)

func (*Calculator) IsFull added in v3.7.0

func (c *Calculator) IsFull() bool

func (*Calculator) Reset

func (c *Calculator) Reset()

func (*Calculator) TimeRanges

func (c *Calculator) TimeRanges() []multitenancy.TimeRange

type Config

type Config struct {
	logsobj.BuilderBaseConfig `yaml:",inline"`
	EventsPerIndex            int           `yaml:"events_per_index" experimental:"true"`
	FlushInterval             time.Duration `yaml:"flush_interval" experimental:"true"`
	MaxIdleTime               time.Duration `yaml:"max_idle_time" experimental:"true"`
}

func (*Config) RegisterFlags

func (cfg *Config) RegisterFlags(f *flag.FlagSet)

func (*Config) RegisterFlagsWithPrefix

func (cfg *Config) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet)

func (*Config) Validate added in v3.7.0

func (cfg *Config) Validate() error

Validate validates the BuilderConfig.

Directories

Path Synopsis
Package indexobj provides tooling for creating index-oriented data objects.
Package indexobj provides tooling for creating index-oriented data objects.

Jump to

Keyboard shortcuts

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