sections

package
v4.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package sections locates the sections of a data object that belong to one tenant.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TenantSet

type TenantSet struct {
	// Streams is the tenant's streams section, or nil when the object holds none for it.
	Streams *dataobj.Section

	// Logs holds the tenant's logs sections, keyed by logs-relative section index.
	//
	// The index counts the logs sections of every tenant in the object, not only this
	// tenant's, so a tenant's sections are not numbered from zero. That is the numbering
	// the metastore's section descriptors use, so a descriptor's index looks up directly
	// here.
	Logs map[int]*dataobj.Section
}

A TenantSet holds the sections of one data object that belong to one tenant.

func ForTenant

func ForTenant(all dataobj.Sections, tenant string) (TenantSet, error)

ForTenant returns the sections of all that belong to tenant.

ForTenant fails when the object holds more than one streams section for the tenant: a data object carries at most one, so reading the first alone would silently drop the streams the other holds.

A tenant with logs sections but no streams section does not fail: the returned TenantSet.Streams is nil.

Directories

Path Synopsis
internal
columnar
Package columnar provides a base implementation for sections which store columnar data using github.com/grafana/loki/v4/pkg/dataobj/internal/dataset.
Package columnar provides a base implementation for sections which store columnar data using github.com/grafana/loki/v4/pkg/dataobj/internal/dataset.
Package logs defines types used for the data object logs section.
Package logs defines types used for the data object logs section.
Package pointers defines types used for the data object pointers section.
Package pointers defines types used for the data object pointers section.
Package postings defines types for the data object postings section.
Package postings defines types for the data object postings section.
Package stats defines types for the data object stats section.
Package stats defines types for the data object stats section.
Package streams defines types used for the data object streams section.
Package streams defines types used for the data object streams section.

Jump to

Keyboard shortcuts

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