manage

package
v0.0.0-...-04d6450 Latest Latest
Warning

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

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

Documentation

Overview

Package manage organizes codes of the indexing library manage

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetReader

func GetReader(
	config *indexlib.Config,
	segments ...string,
) (indexlib.Reader, error)

GetReader The Reader represents a stable snapshot of the index a point in time. This means that changes made to the index after the reader is obtained never affect the results returned by this reader. This also means that this Reader is holding onto resources and MUST be closed when it is no longer needed.

func GetReaderUsingCache

func GetReaderUsingCache(config *indexlib.Config, index string) (indexlib.Reader, error)

GetReaderUsingCache tries to get reader from cache firstly, or open a new reader and cache it.

func GetWriter

func GetWriter(
	config *indexlib.Config,
	mappings protocol.Mappings,
	index string,
	segment string,
) (indexlib.Writer, error)

GetWriter Writer’s hold an exclusive-lock on their underlying directory which prevents other processes from opening a writer while this one is still open. This does not affect Readers that are already open, and it does not prevent new Readers from being opened, but it does mean care should be taken to close the Writer when your work done.

Types

This section is empty.

Jump to

Keyboard shortcuts

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