segment

package
v5.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 14 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SegmentError

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

func NewErrors

func NewErrors() SegmentError

func (*SegmentError) Error

func (e *SegmentError) Error() string

type UpdateResult

type UpdateResult struct {
	UpdatedKeys     []string
	NewChangeNumber int64
}

UpdateResult encapsulates information regarding the segment update performed

type Updater

type Updater interface {
	SynchronizeSegment(name string, till *int64) (*UpdateResult, error)
	SynchronizeSegments() (map[string]UpdateResult, error)
	SegmentNames() []interface{}
	IsSegmentCached(segmentName string) bool
}

Updater interface

type UpdaterImpl

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

UpdaterImpl struct for segment sync

func NewSegmentUpdater

func NewSegmentUpdater(
	splitStorage storage.SplitStorage,
	segmentStorage storage.SegmentStorage,
	segmentFetcher service.SegmentFetcher,
	logger logging.LoggerInterface,
	runtimeTelemetry storage.TelemetryRuntimeProducer,
	hcMonitor application.MonitorProducerInterface,
) *UpdaterImpl

NewSegmentUpdater creates new segment synchronizer for processing segment updates

func (*UpdaterImpl) IsSegmentCached

func (s *UpdaterImpl) IsSegmentCached(segmentName string) bool

IsSegmentCached returns true if a segment exists

func (*UpdaterImpl) SegmentNames

func (s *UpdaterImpl) SegmentNames() []interface{}

SegmentNames returns all segments

func (*UpdaterImpl) SynchronizeSegment

func (s *UpdaterImpl) SynchronizeSegment(name string, till *int64) (*UpdateResult, error)

SynchronizeSegment syncs segment

func (*UpdaterImpl) SynchronizeSegments

func (s *UpdaterImpl) SynchronizeSegments() (map[string]UpdateResult, error)

SynchronizeSegments syncs segments at once

Jump to

Keyboard shortcuts

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