indexer

package
v1.2.14-prerelease13 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: MIT Imports: 21 Imported by: 2

Documentation

Overview

Package indexer is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	IndexerConcurrency             dynamicconfig.IntPropertyFn
	ESProcessorNumOfWorkers        dynamicconfig.IntPropertyFn
	ESProcessorBulkActions         dynamicconfig.IntPropertyFn // max number of requests in bulk
	ESProcessorBulkSize            dynamicconfig.IntPropertyFn // max total size of bytes in bulk
	ESProcessorFlushInterval       dynamicconfig.DurationPropertyFn
	ValidSearchAttributes          dynamicconfig.MapPropertyFn
	EnableQueryAttributeValidation dynamicconfig.BoolPropertyFn
}

Config contains all configs for indexer

type ESProcessor

type ESProcessor interface {
	common.Daemon
	Add(request *bulk.GenericBulkableAddRequest, key string, kafkaMsg messaging.Message)
}

type ESProcessorImpl added in v1.2.1

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

ESProcessorImpl implements ESProcessor, it's an agent of GenericBulkProcessor

func (*ESProcessorImpl) Add added in v1.2.1

func (p *ESProcessorImpl) Add(request *bulk.GenericBulkableAddRequest, key string, kafkaMsg messaging.Message)

Add an ES request, and an map item for kafka message

func (*ESProcessorImpl) Start added in v1.2.1

func (p *ESProcessorImpl) Start()

func (*ESProcessorImpl) Stop added in v1.2.1

func (p *ESProcessorImpl) Stop()

type Indexer

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

Indexer used to consumer data from kafka then send to ElasticSearch

func NewIndexer

func NewIndexer(
	config *Config,
	client messaging.Client,
	visibilityClient es.GenericClient,
	visibilityName string,
	logger log.Logger,
	metricsClient metrics.Client,
) *Indexer

NewIndexer create a new Indexer

func NewMigrationIndexer added in v1.2.14

func NewMigrationIndexer(
	config *Config,
	client messaging.Client,
	primaryClient es.GenericClient,
	secondaryClient es.GenericClient,
	visibilityName string,
	logger log.Logger,
	metricsClient metrics.Client,
) *Indexer

NewMigrationIndexer create a new Indexer that can index to both ES and OS

func (*Indexer) Start

func (i *Indexer) Start() error

func (*Indexer) Stop

func (i *Indexer) Stop()

type MockESProcessor

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

MockESProcessor is a mock of ESProcessor interface.

func NewMockESProcessor

func NewMockESProcessor(ctrl *gomock.Controller) *MockESProcessor

NewMockESProcessor creates a new mock instance.

func (*MockESProcessor) Add

func (m *MockESProcessor) Add(request *bulk.GenericBulkableAddRequest, key string, kafkaMsg messaging.Message)

Add mocks base method.

func (*MockESProcessor) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockESProcessor) Start

func (m *MockESProcessor) Start()

Start mocks base method.

func (*MockESProcessor) Stop

func (m *MockESProcessor) Stop()

Stop mocks base method.

type MockESProcessorMockRecorder

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

MockESProcessorMockRecorder is the mock recorder for MockESProcessor.

func (*MockESProcessorMockRecorder) Add

func (mr *MockESProcessorMockRecorder) Add(request, key, kafkaMsg interface{}) *gomock.Call

Add indicates an expected call of Add.

func (*MockESProcessorMockRecorder) Start

Start indicates an expected call of Start.

func (*MockESProcessorMockRecorder) Stop

Stop indicates an expected call of Stop.

Jump to

Keyboard shortcuts

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