index

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package index implements transferring data to indices.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	IndexWriter  tsdb.IndexWriter
	BlockCloser  io.Closer
	Value        Value
	Scope        tsdb.Entry
	GlobalItemID tsdb.GlobalItemID
}

Message wraps value and other info to generate relative indices.

type Value

type Value struct {
	Timestamp   time.Time
	TagFamilies []*modelv1.TagFamilyForWrite
}

Value represents the input data for generating indices.

type Writer

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

Writer generates indices based on index rules.

func NewWriter

func NewWriter(ctx context.Context, options WriterOptions) *Writer

NewWriter returns a new Writer with WriterOptions.

func (*Writer) Write

func (s *Writer) Write(m Message)

type WriterOptions

type WriterOptions struct {
	DB                tsdb.Supplier
	Families          []*databasev1.TagFamilySpec
	IndexRules        []*databasev1.IndexRule
	ShardNum          uint32
	EnableGlobalIndex bool
}

WriterOptions wrap all options to create an index writer.

Jump to

Keyboard shortcuts

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