Documentation ¶
Overview ¶
Package elasticsearch is a generated GoMock package.
Index ¶
- Constants
- func ConvertElasticsearchClientError(message string, err error) error
- func GetDocID(workflowID string, runID string) string
- func GetVisibilityTaskKey(shardID int32, taskID int64) string
- func NewNameInterceptor(namespaceName namespace.Name, saTypeMap searchattribute.NameTypeMap, ...) *nameInterceptor
- func NewProcessor(cfg *ProcessorConfig, esClient client.Client, logger log.Logger, ...) *processorImpl
- func NewQueryConverter(fnInterceptor query.FieldNameInterceptor, ...) *query.Converter
- func NewValuesInterceptor(namespaceName namespace.Name, saTypeMap searchattribute.NameTypeMap, ...) *valuesInterceptor
- type MockProcessor
- type MockProcessorMockRecorder
- type Processor
- type ProcessorConfig
- type VisibilityStore
- func (s *VisibilityStore) AddBulkRequestAndWait(_ context.Context, bulkRequest *client.BulkableRequest, ...) error
- func (s *VisibilityStore) BuildSearchParametersV2(request *manager.ListWorkflowExecutionsRequestV2, ...) (*client.SearchParameters, error)
- func (s *VisibilityStore) Close()
- func (s *VisibilityStore) CountWorkflowExecutions(ctx context.Context, request *manager.CountWorkflowExecutionsRequest) (*manager.CountWorkflowExecutionsResponse, error)
- func (s *VisibilityStore) DeleteWorkflowExecution(ctx context.Context, request *manager.VisibilityDeleteWorkflowExecutionRequest) error
- func (s *VisibilityStore) GenerateClosedESDoc(request *store.InternalRecordWorkflowExecutionClosedRequest, ...) (map[string]interface{}, error)
- func (s *VisibilityStore) GenerateESDoc(request *store.InternalVisibilityRequestBase, visibilityTaskKey string) (map[string]interface{}, error)
- func (s *VisibilityStore) GetEsClient() client.Client
- func (s *VisibilityStore) GetIndexName() string
- func (s *VisibilityStore) GetListFieldSorter(fieldSorts []elastic.Sorter) ([]elastic.Sorter, error)
- func (s *VisibilityStore) GetListWorkflowExecutionsResponse(searchResult *elastic.SearchResult, namespace namespace.Name, pageSize int) (*store.InternalListWorkflowExecutionsResponse, error)
- func (s *VisibilityStore) GetName() string
- func (s *VisibilityStore) GetSearchAttributesProvider() searchattribute.Provider
- func (s *VisibilityStore) GetWorkflowExecution(ctx context.Context, request *manager.GetWorkflowExecutionRequest) (*store.InternalGetWorkflowExecutionResponse, error)
- func (s *VisibilityStore) ListWorkflowExecutions(ctx context.Context, request *manager.ListWorkflowExecutionsRequestV2) (*store.InternalListWorkflowExecutionsResponse, error)
- func (s *VisibilityStore) ParseESDoc(docID string, docSource json.RawMessage, saTypeMap searchattribute.NameTypeMap, ...) (*store.InternalWorkflowExecutionInfo, error)
- func (s *VisibilityStore) RecordWorkflowExecutionClosed(ctx context.Context, ...) error
- func (s *VisibilityStore) RecordWorkflowExecutionStarted(ctx context.Context, ...) error
- func (s *VisibilityStore) ScanWorkflowExecutions(ctx context.Context, request *manager.ListWorkflowExecutionsRequestV2) (*store.InternalListWorkflowExecutionsResponse, error)
- func (s *VisibilityStore) UpsertWorkflowExecution(ctx context.Context, request *store.InternalUpsertWorkflowExecutionRequest) error
- func (s *VisibilityStore) ValidateCustomSearchAttributes(searchAttributes map[string]any) (map[string]any, error)
Constants ¶
const (
PersistenceName = "elasticsearch"
)
Variables ¶
This section is empty.
Functions ¶
func ConvertElasticsearchClientError ¶ added in v1.25.0
func GetVisibilityTaskKey ¶ added in v1.25.0
func NewNameInterceptor ¶ added in v1.25.0
func NewNameInterceptor( namespaceName namespace.Name, saTypeMap searchattribute.NameTypeMap, searchAttributesMapperProvider searchattribute.MapperProvider, ) *nameInterceptor
func NewProcessor ¶
func NewProcessor( cfg *ProcessorConfig, esClient client.Client, logger log.Logger, metricsHandler metrics.Handler, ) *processorImpl
NewProcessor create new processorImpl
func NewQueryConverter ¶ added in v1.24.0
func NewQueryConverter( fnInterceptor query.FieldNameInterceptor, fvInterceptor query.FieldValuesInterceptor, saNameType searchattribute.NameTypeMap, ) *query.Converter
func NewValuesInterceptor ¶ added in v1.14.0
func NewValuesInterceptor( namespaceName namespace.Name, saTypeMap searchattribute.NameTypeMap, searchAttributesMapperProvider searchattribute.MapperProvider, ) *valuesInterceptor
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) *future.FutureImpl[bool]
Add mocks base method.
func (*MockProcessor) EXPECT ¶
func (m *MockProcessor) EXPECT() *MockProcessorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockProcessor) Remove ¶ added in v1.17.0
func (m *MockProcessor) Remove(visibilityTaskKey string)
Remove 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) Remove ¶ added in v1.17.0
func (mr *MockProcessorMockRecorder) Remove(visibilityTaskKey interface{}) *gomock.Call
Remove indicates an expected call of Remove.
func (*MockProcessorMockRecorder) Start ¶
func (mr *MockProcessorMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
func (*MockProcessorMockRecorder) Stop ¶
func (mr *MockProcessorMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
type Processor ¶
type Processor interface { // Add request to bulk processor. Add(request *client.BulkableRequest, visibilityTaskKey string) *future.FutureImpl[bool] Start() Stop() }
Processor is interface for Elasticsearch bulk processor
type ProcessorConfig ¶
type ProcessorConfig struct { IndexerConcurrency dynamicconfig.IntPropertyFn // TODO: remove ESProcessor prefix 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 ESProcessorAckTimeout dynamicconfig.DurationPropertyFn }
ProcessorConfig contains all configs for processor
type VisibilityStore ¶ added in v1.25.0
type VisibilityStore struct {
// contains filtered or unexported fields
}
func NewVisibilityStore ¶
func NewVisibilityStore( cfg *client.Config, processorConfig *ProcessorConfig, searchAttributesProvider searchattribute.Provider, searchAttributesMapperProvider searchattribute.MapperProvider, disableOrderByClause dynamicconfig.BoolPropertyFnWithNamespaceFilter, enableManualPagination dynamicconfig.BoolPropertyFnWithNamespaceFilter, metricsHandler metrics.Handler, logger log.Logger, ) (*VisibilityStore, error)
NewVisibilityStore create a visibility store connecting to ElasticSearch
func (*VisibilityStore) AddBulkRequestAndWait ¶ added in v1.25.0
func (s *VisibilityStore) AddBulkRequestAndWait( _ context.Context, bulkRequest *client.BulkableRequest, visibilityTaskKey string, ) error
func (*VisibilityStore) BuildSearchParametersV2 ¶ added in v1.25.0
func (s *VisibilityStore) BuildSearchParametersV2( request *manager.ListWorkflowExecutionsRequestV2, getFieldSorter func([]elastic.Sorter) ([]elastic.Sorter, error), ) (*client.SearchParameters, error)
func (*VisibilityStore) Close ¶ added in v1.25.0
func (s *VisibilityStore) Close()
func (*VisibilityStore) CountWorkflowExecutions ¶ added in v1.25.0
func (s *VisibilityStore) CountWorkflowExecutions( ctx context.Context, request *manager.CountWorkflowExecutionsRequest, ) (*manager.CountWorkflowExecutionsResponse, error)
func (*VisibilityStore) DeleteWorkflowExecution ¶ added in v1.25.0
func (s *VisibilityStore) DeleteWorkflowExecution( ctx context.Context, request *manager.VisibilityDeleteWorkflowExecutionRequest, ) error
func (*VisibilityStore) GenerateClosedESDoc ¶ added in v1.25.0
func (s *VisibilityStore) GenerateClosedESDoc( request *store.InternalRecordWorkflowExecutionClosedRequest, visibilityTaskKey string, ) (map[string]interface{}, error)
func (*VisibilityStore) GenerateESDoc ¶ added in v1.25.0
func (s *VisibilityStore) GenerateESDoc( request *store.InternalVisibilityRequestBase, visibilityTaskKey string, ) (map[string]interface{}, error)
func (*VisibilityStore) GetEsClient ¶ added in v1.25.0
func (s *VisibilityStore) GetEsClient() client.Client
func (*VisibilityStore) GetIndexName ¶ added in v1.25.0
func (s *VisibilityStore) GetIndexName() string
func (*VisibilityStore) GetListFieldSorter ¶ added in v1.25.0
func (s *VisibilityStore) GetListFieldSorter(fieldSorts []elastic.Sorter) ([]elastic.Sorter, error)
func (*VisibilityStore) GetListWorkflowExecutionsResponse ¶ added in v1.25.0
func (s *VisibilityStore) GetListWorkflowExecutionsResponse( searchResult *elastic.SearchResult, namespace namespace.Name, pageSize int, ) (*store.InternalListWorkflowExecutionsResponse, error)
func (*VisibilityStore) GetName ¶ added in v1.25.0
func (s *VisibilityStore) GetName() string
func (*VisibilityStore) GetSearchAttributesProvider ¶ added in v1.25.0
func (s *VisibilityStore) GetSearchAttributesProvider() searchattribute.Provider
func (*VisibilityStore) GetWorkflowExecution ¶ added in v1.25.0
func (s *VisibilityStore) GetWorkflowExecution( ctx context.Context, request *manager.GetWorkflowExecutionRequest, ) (*store.InternalGetWorkflowExecutionResponse, error)
func (*VisibilityStore) ListWorkflowExecutions ¶ added in v1.25.0
func (s *VisibilityStore) ListWorkflowExecutions( ctx context.Context, request *manager.ListWorkflowExecutionsRequestV2, ) (*store.InternalListWorkflowExecutionsResponse, error)
func (*VisibilityStore) ParseESDoc ¶ added in v1.25.0
func (s *VisibilityStore) ParseESDoc( docID string, docSource json.RawMessage, saTypeMap searchattribute.NameTypeMap, namespaceName namespace.Name, ) (*store.InternalWorkflowExecutionInfo, error)
func (*VisibilityStore) RecordWorkflowExecutionClosed ¶ added in v1.25.0
func (s *VisibilityStore) RecordWorkflowExecutionClosed( ctx context.Context, request *store.InternalRecordWorkflowExecutionClosedRequest, ) error
func (*VisibilityStore) RecordWorkflowExecutionStarted ¶ added in v1.25.0
func (s *VisibilityStore) RecordWorkflowExecutionStarted( ctx context.Context, request *store.InternalRecordWorkflowExecutionStartedRequest, ) error
func (*VisibilityStore) ScanWorkflowExecutions ¶ added in v1.25.0
func (s *VisibilityStore) ScanWorkflowExecutions( ctx context.Context, request *manager.ListWorkflowExecutionsRequestV2, ) (*store.InternalListWorkflowExecutionsResponse, error)
func (*VisibilityStore) UpsertWorkflowExecution ¶ added in v1.25.0
func (s *VisibilityStore) UpsertWorkflowExecution( ctx context.Context, request *store.InternalUpsertWorkflowExecutionRequest, ) error