Documentation ¶
Overview ¶
Package elasticsearch is a generated GoMock package.
Index ¶
- func NewESVisibilityManager(indexName string, esClient es.Client, cfg *config.VisibilityConfig, ...) p.VisibilityManager
- func NewElasticSearchVisibilityStore(esClient es.Client, index string, producer messaging.Producer, ...) *esVisibilityStore
- func NewProcessor(cfg *ProcessorConfig, client elasticsearch.Client, logger log.Logger, ...) *esProcessorImpl
- func NewVisibilityMetricsClient(persistence p.VisibilityManager, metricClient metrics.Client, ...) p.VisibilityManager
- type ElasticBulkProcessor
- type MockElasticBulkProcessor
- func (m *MockElasticBulkProcessor) Add(request elastic.BulkableRequest)
- func (m *MockElasticBulkProcessor) Close() error
- func (m *MockElasticBulkProcessor) EXPECT() *MockElasticBulkProcessorMockRecorder
- func (m *MockElasticBulkProcessor) Flush() error
- func (m *MockElasticBulkProcessor) Start(ctx context.Context) error
- func (m *MockElasticBulkProcessor) Stats() elastic.BulkProcessorStats
- func (m *MockElasticBulkProcessor) Stop() error
- type MockElasticBulkProcessorMockRecorder
- func (mr *MockElasticBulkProcessorMockRecorder) Add(request interface{}) *gomock.Call
- func (mr *MockElasticBulkProcessorMockRecorder) Close() *gomock.Call
- func (mr *MockElasticBulkProcessorMockRecorder) Flush() *gomock.Call
- func (mr *MockElasticBulkProcessorMockRecorder) Start(ctx interface{}) *gomock.Call
- func (mr *MockElasticBulkProcessorMockRecorder) Stats() *gomock.Call
- func (mr *MockElasticBulkProcessorMockRecorder) Stop() *gomock.Call
- type MockProcessor
- type MockProcessorMockRecorder
- type Processor
- type ProcessorConfig
- type VisibilityTaskAckTimeoutError
- type VisibilityTaskNAckError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewESVisibilityManager ¶ added in v0.5.7
func NewESVisibilityManager( indexName string, esClient es.Client, cfg *config.VisibilityConfig, producer messaging.Producer, processor Processor, metricsClient metrics.Client, log log.Logger, ) p.VisibilityManager
NewESVisibilityManager create a visibility manager for ElasticSearch In history, it only needs kafka producer for writing data; In frontend, it only needs ES client and related config for reading data
func NewElasticSearchVisibilityStore ¶ added in v0.5.7
func NewElasticSearchVisibilityStore( esClient es.Client, index string, producer messaging.Producer, processor Processor, cfg *config.VisibilityConfig, logger log.Logger, metricsClient metrics.Client, ) *esVisibilityStore
NewElasticSearchVisibilityStore create a visibility store connecting to ElasticSearch
func NewProcessor ¶ added in v1.5.0
func NewProcessor( cfg *ProcessorConfig, client elasticsearch.Client, logger log.Logger, metricsClient metrics.Client, ) *esProcessorImpl
NewProcessor create new esProcessorImpl
func NewVisibilityMetricsClient ¶
func NewVisibilityMetricsClient(persistence p.VisibilityManager, metricClient metrics.Client, logger log.Logger) p.VisibilityManager
NewVisibilityMetricsClient wrap visibility client with metrics
Types ¶
type ElasticBulkProcessor ¶ added in v1.5.0
type ElasticBulkProcessor interface { Start(ctx context.Context) error Stop() error Close() error Stats() elastic.BulkProcessorStats Add(request elastic.BulkableRequest) Flush() error }
ElasticBulkProcessor is interface for elastic.BulkProcessor (elastic package doesn't provide such interface that tests can mock)
type MockElasticBulkProcessor ¶ added in v1.5.0
type MockElasticBulkProcessor struct {
// contains filtered or unexported fields
}
MockElasticBulkProcessor is a mock of ElasticBulkProcessor interface.
func NewMockElasticBulkProcessor ¶ added in v1.5.0
func NewMockElasticBulkProcessor(ctrl *gomock.Controller) *MockElasticBulkProcessor
NewMockElasticBulkProcessor creates a new mock instance.
func (*MockElasticBulkProcessor) Add ¶ added in v1.5.0
func (m *MockElasticBulkProcessor) Add(request elastic.BulkableRequest)
Add mocks base method.
func (*MockElasticBulkProcessor) Close ¶ added in v1.5.0
func (m *MockElasticBulkProcessor) Close() error
Close mocks base method.
func (*MockElasticBulkProcessor) EXPECT ¶ added in v1.5.0
func (m *MockElasticBulkProcessor) EXPECT() *MockElasticBulkProcessorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockElasticBulkProcessor) Flush ¶ added in v1.5.0
func (m *MockElasticBulkProcessor) Flush() error
Flush mocks base method.
func (*MockElasticBulkProcessor) Start ¶ added in v1.5.0
func (m *MockElasticBulkProcessor) Start(ctx context.Context) error
Start mocks base method.
func (*MockElasticBulkProcessor) Stats ¶ added in v1.5.0
func (m *MockElasticBulkProcessor) Stats() elastic.BulkProcessorStats
Stats mocks base method.
func (*MockElasticBulkProcessor) Stop ¶ added in v1.5.0
func (m *MockElasticBulkProcessor) Stop() error
Stop mocks base method.
type MockElasticBulkProcessorMockRecorder ¶ added in v1.5.0
type MockElasticBulkProcessorMockRecorder struct {
// contains filtered or unexported fields
}
MockElasticBulkProcessorMockRecorder is the mock recorder for MockElasticBulkProcessor.
func (*MockElasticBulkProcessorMockRecorder) Add ¶ added in v1.5.0
func (mr *MockElasticBulkProcessorMockRecorder) Add(request interface{}) *gomock.Call
Add indicates an expected call of Add.
func (*MockElasticBulkProcessorMockRecorder) Close ¶ added in v1.5.0
func (mr *MockElasticBulkProcessorMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockElasticBulkProcessorMockRecorder) Flush ¶ added in v1.5.0
func (mr *MockElasticBulkProcessorMockRecorder) Flush() *gomock.Call
Flush indicates an expected call of Flush.
func (*MockElasticBulkProcessorMockRecorder) Start ¶ added in v1.5.0
func (mr *MockElasticBulkProcessorMockRecorder) Start(ctx interface{}) *gomock.Call
Start indicates an expected call of Start.
func (*MockElasticBulkProcessorMockRecorder) Stats ¶ added in v1.5.0
func (mr *MockElasticBulkProcessorMockRecorder) Stats() *gomock.Call
Stats indicates an expected call of Stats.
func (*MockElasticBulkProcessorMockRecorder) Stop ¶ added in v1.5.0
func (mr *MockElasticBulkProcessorMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
type MockProcessor ¶ added in v1.5.0
type MockProcessor struct {
// contains filtered or unexported fields
}
MockProcessor is a mock of Processor interface.
func NewMockProcessor ¶ added in v1.5.0
func NewMockProcessor(ctrl *gomock.Controller) *MockProcessor
NewMockProcessor creates a new mock instance.
func (*MockProcessor) Add ¶ added in v1.5.0
func (m *MockProcessor) Add(request elastic.BulkableRequest, visibilityTaskKey string, ackCh chan<- bool)
Add mocks base method.
func (*MockProcessor) EXPECT ¶ added in v1.5.0
func (m *MockProcessor) EXPECT() *MockProcessorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockProcessor) Start ¶ added in v1.5.0
func (m *MockProcessor) Start()
Start mocks base method.
type MockProcessorMockRecorder ¶ added in v1.5.0
type MockProcessorMockRecorder struct {
// contains filtered or unexported fields
}
MockProcessorMockRecorder is the mock recorder for MockProcessor.
func (*MockProcessorMockRecorder) Add ¶ added in v1.5.0
func (mr *MockProcessorMockRecorder) Add(request, visibilityTaskKey, ackCh interface{}) *gomock.Call
Add indicates an expected call of Add.
func (*MockProcessorMockRecorder) Start ¶ added in v1.5.0
func (mr *MockProcessorMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
func (*MockProcessorMockRecorder) Stop ¶ added in v1.5.0
func (mr *MockProcessorMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
type Processor ¶ added in v1.5.0
type Processor interface { common.Daemon // Add request to bulk, and record kafka message in map with provided key // This call will be blocked when downstream has issues Add(request elastic.BulkableRequest, visibilityTaskKey string, ackCh chan<- bool) }
Processor is interface for elastic search bulk processor
type ProcessorConfig ¶ added in v1.5.0
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 ValidSearchAttributes dynamicconfig.MapPropertyFn }
ProcessorConfig contains all configs for processor
type VisibilityTaskAckTimeoutError ¶ added in v1.5.0
func (*VisibilityTaskAckTimeoutError) Error ¶ added in v1.5.0
func (v *VisibilityTaskAckTimeoutError) Error() string
type VisibilityTaskNAckError ¶ added in v1.5.0
type VisibilityTaskNAckError struct {
VisibilityTaskKey string
}
func (*VisibilityTaskNAckError) Error ¶ added in v1.5.0
func (v *VisibilityTaskNAckError) Error() string