elasticsearch

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: MIT Imports: 30 Imported by: 0

Documentation

Overview

Package elasticsearch is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProcessor

func NewProcessor(
	cfg *ProcessorConfig,
	esClient esclient.Client,
	logger log.Logger,
	metricsClient metrics.Client,
) *processorImpl

NewProcessor create new processorImpl

func NewVisibilityManager

func NewVisibilityManager(
	indexName string,
	esClient esclient.Client,
	cfg *config.VisibilityConfig,
	searchAttributesProvider searchattribute.Provider,
	searchAttributesMapper searchattribute.Mapper,
	processor Processor,
	metricsClient metrics.Client,
	log log.Logger,
) visibility.VisibilityManager

NewVisibilityManager create a visibility manager for Elasticsearch In history, it only writes data; In frontend, it only needs ES client and related config for reading data

func NewVisibilityManagerMetrics

func NewVisibilityManagerMetrics(persistence visibility.VisibilityManager, metricClient metrics.Client, logger log.Logger) visibility.VisibilityManager

NewVisibilityManagerMetrics wrap visibility client with metrics

func NewVisibilityStore

func NewVisibilityStore(
	esClient esclient.Client,
	index string,
	searchAttributesProvider searchattribute.Provider,
	searchAttributesMapper searchattribute.Mapper,
	processor Processor,
	cfg *config.VisibilityConfig,
	metricsClient metrics.Client,
) *visibilityStore

NewVisibilityStore create a visibility store connecting to ElasticSearch

Types

type MockProcessor

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

MockProcessor is a mock of Processor interface.

func NewMockProcessor

func NewMockProcessor(ctrl *gomock.Controller) *MockProcessor

NewMockProcessor creates a new mock instance.

func (*MockProcessor) Add

func (m *MockProcessor) Add(request *client.BulkableRequest, visibilityTaskKey string) <-chan bool

Add mocks base method.

func (*MockProcessor) EXPECT

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

func (*MockProcessor) Start

func (m *MockProcessor) Start()

Start mocks base method.

func (*MockProcessor) Stop

func (m *MockProcessor) Stop()

Stop mocks base method.

type MockProcessorMockRecorder

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

MockProcessorMockRecorder is the mock recorder for MockProcessor.

func (*MockProcessorMockRecorder) Add

func (mr *MockProcessorMockRecorder) Add(request, visibilityTaskKey interface{}) *gomock.Call

Add indicates an expected call of Add.

func (*MockProcessorMockRecorder) Start

func (mr *MockProcessorMockRecorder) Start() *gomock.Call

Start indicates an expected call of Start.

func (*MockProcessorMockRecorder) Stop

Stop indicates an expected call of Stop.

type Processor

type Processor interface {
	common.Daemon

	// Add request to bulk processor.
	Add(request *esclient.BulkableRequest, visibilityTaskKey string) <-chan bool
}

Processor is interface for elastic search bulk processor

type ProcessorConfig

type ProcessorConfig 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
}

ProcessorConfig contains all configs for processor

type VisibilityTaskAckTimeoutError

type VisibilityTaskAckTimeoutError struct {
	VisibilityTaskKey string
	Timeout           time.Duration
}

func (*VisibilityTaskAckTimeoutError) Error

type VisibilityTaskNAckError

type VisibilityTaskNAckError struct {
	VisibilityTaskKey string
}

func (*VisibilityTaskNAckError) Error

func (v *VisibilityTaskNAckError) Error() string

Directories

Path Synopsis
Package client is a generated GoMock package.
Package client is a generated GoMock package.
Package query is inspired and partially copied from by github.com/cch123/elasticsql.
Package query is inspired and partially copied from by github.com/cch123/elasticsql.

Jump to

Keyboard shortcuts

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