Documentation
¶
Overview ¶
Package store is a generated GoMock package.
Index ¶
- func CombineTypeMaps(customTypeMap searchattribute.NameTypeMap, ...) searchattribute.NameTypeMap
- func NewVisibilityStoreInvalidValuesError(errs []error) error
- type InternalAggregationGroup
- type InternalCountExecutionsResponse
- type InternalExecutionInfo
- type InternalGetWorkflowExecutionResponse
- type InternalListExecutionsResponse
- type InternalRecordWorkflowExecutionClosedRequest
- type InternalRecordWorkflowExecutionStartedRequest
- type InternalUpsertWorkflowExecutionRequest
- type InternalVisibilityRequestBase
- type MockVisibilityStore
- func (m *MockVisibilityStore) AddSearchAttributes(ctx context.Context, request *manager.AddSearchAttributesRequest) error
- func (m *MockVisibilityStore) Close()
- func (m *MockVisibilityStore) CountChasmExecutions(ctx context.Context, request *manager.CountChasmExecutionsRequest) (*InternalCountExecutionsResponse, error)
- func (m *MockVisibilityStore) CountWorkflowExecutions(ctx context.Context, request *manager.CountWorkflowExecutionsRequest) (*InternalCountExecutionsResponse, error)
- func (m *MockVisibilityStore) DeleteWorkflowExecution(ctx context.Context, request *manager.VisibilityDeleteWorkflowExecutionRequest) error
- func (m *MockVisibilityStore) EXPECT() *MockVisibilityStoreMockRecorder
- func (m *MockVisibilityStore) GetIndexName() string
- func (m *MockVisibilityStore) GetName() string
- func (m *MockVisibilityStore) GetWorkflowExecution(ctx context.Context, request *manager.GetWorkflowExecutionRequest) (*InternalGetWorkflowExecutionResponse, error)
- func (m *MockVisibilityStore) ListChasmExecutions(ctx context.Context, request *manager.ListChasmExecutionsRequest) (*InternalListExecutionsResponse, error)
- func (m *MockVisibilityStore) ListWorkflowExecutions(ctx context.Context, request *manager.ListWorkflowExecutionsRequestV2) (*InternalListExecutionsResponse, error)
- func (m *MockVisibilityStore) RecordWorkflowExecutionClosed(ctx context.Context, request *InternalRecordWorkflowExecutionClosedRequest) error
- func (m *MockVisibilityStore) RecordWorkflowExecutionStarted(ctx context.Context, request *InternalRecordWorkflowExecutionStartedRequest) error
- func (m *MockVisibilityStore) UpsertWorkflowExecution(ctx context.Context, request *InternalUpsertWorkflowExecutionRequest) error
- func (m *MockVisibilityStore) ValidateCustomSearchAttributes(searchAttributes map[string]any) (map[string]any, error)
- type MockVisibilityStoreMockRecorder
- func (mr *MockVisibilityStoreMockRecorder) AddSearchAttributes(ctx, request any) *gomock.Call
- func (mr *MockVisibilityStoreMockRecorder) Close() *gomock.Call
- func (mr *MockVisibilityStoreMockRecorder) CountChasmExecutions(ctx, request any) *gomock.Call
- func (mr *MockVisibilityStoreMockRecorder) CountWorkflowExecutions(ctx, request any) *gomock.Call
- func (mr *MockVisibilityStoreMockRecorder) DeleteWorkflowExecution(ctx, request any) *gomock.Call
- func (mr *MockVisibilityStoreMockRecorder) GetIndexName() *gomock.Call
- func (mr *MockVisibilityStoreMockRecorder) GetName() *gomock.Call
- func (mr *MockVisibilityStoreMockRecorder) GetWorkflowExecution(ctx, request any) *gomock.Call
- func (mr *MockVisibilityStoreMockRecorder) ListChasmExecutions(ctx, request any) *gomock.Call
- func (mr *MockVisibilityStoreMockRecorder) ListWorkflowExecutions(ctx, request any) *gomock.Call
- func (mr *MockVisibilityStoreMockRecorder) RecordWorkflowExecutionClosed(ctx, request any) *gomock.Call
- func (mr *MockVisibilityStoreMockRecorder) RecordWorkflowExecutionStarted(ctx, request any) *gomock.Call
- func (mr *MockVisibilityStoreMockRecorder) UpsertWorkflowExecution(ctx, request any) *gomock.Call
- func (mr *MockVisibilityStoreMockRecorder) ValidateCustomSearchAttributes(searchAttributes any) *gomock.Call
- type VisibilityStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CombineTypeMaps ¶
func CombineTypeMaps(customTypeMap searchattribute.NameTypeMap, chasmTypeMap *chasm.VisibilitySearchAttributesMapper) searchattribute.NameTypeMap
Types ¶
type InternalAggregationGroup ¶
InternalAggregationGroup represents a GROUP BY aggregation result
type InternalCountExecutionsResponse ¶
type InternalCountExecutionsResponse struct {
Count int64
Groups []InternalAggregationGroup
}
InternalCountExecutionsResponse is response from CountWorkflowExecutions and CountChasmExecutions
type InternalExecutionInfo ¶
type InternalExecutionInfo struct {
WorkflowID string
RunID string
TypeName string
StartTime time.Time
ExecutionTime time.Time
CloseTime time.Time
ExecutionDuration time.Duration
Status enumspb.WorkflowExecutionStatus
HistoryLength int64
HistorySizeBytes int64
StateTransitionCount int64
Memo *commonpb.DataBlob
TaskQueue string
SearchAttributes *commonpb.SearchAttributes
ParentWorkflowID string
ParentRunID string
RootWorkflowID string
RootRunID string
}
InternalExecutionInfo is internal visibility info for workflow execution
type InternalGetWorkflowExecutionResponse ¶
type InternalGetWorkflowExecutionResponse struct {
Execution *InternalExecutionInfo
}
InternalGetWorkflowExecutionResponse is response from GetWorkflowExecution
type InternalListExecutionsResponse ¶
type InternalListExecutionsResponse struct {
Executions []*InternalExecutionInfo
// Token to read next page if there are more workflow executions beyond page size.
// Use this to set NextPageToken on ListWorkflowExecutionsRequest to read the next page.
NextPageToken []byte
}
InternalListExecutionsResponse is response from ListWorkflowExecutions and ListChasmExecutions
type InternalRecordWorkflowExecutionClosedRequest ¶
type InternalRecordWorkflowExecutionClosedRequest struct {
*InternalVisibilityRequestBase
CloseTime time.Time
HistoryLength int64
HistorySizeBytes int64
ExecutionDuration time.Duration
StateTransitionCount int64
}
InternalRecordWorkflowExecutionClosedRequest is request to RecordWorkflowExecutionClosed
type InternalRecordWorkflowExecutionStartedRequest ¶
type InternalRecordWorkflowExecutionStartedRequest struct {
*InternalVisibilityRequestBase
}
InternalRecordWorkflowExecutionStartedRequest request to RecordWorkflowExecutionStarted
type InternalUpsertWorkflowExecutionRequest ¶
type InternalUpsertWorkflowExecutionRequest struct {
*InternalVisibilityRequestBase
}
InternalUpsertWorkflowExecutionRequest is request to UpsertWorkflowExecution
type InternalVisibilityRequestBase ¶
type InternalVisibilityRequestBase struct {
NamespaceID string
WorkflowID string
RunID string
WorkflowTypeName string
StartTime time.Time
Status enumspb.WorkflowExecutionStatus
ExecutionTime time.Time
TaskID int64
ShardID int32
Memo *commonpb.DataBlob
TaskQueue string
SearchAttributes *commonpb.SearchAttributes
ParentWorkflowID *string
ParentRunID *string
RootWorkflowID string
RootRunID string
}
InternalVisibilityRequestBase is a base request to visibility APIs.
type MockVisibilityStore ¶
type MockVisibilityStore struct {
// contains filtered or unexported fields
}
MockVisibilityStore is a mock of VisibilityStore interface.
func NewMockVisibilityStore ¶
func NewMockVisibilityStore(ctrl *gomock.Controller) *MockVisibilityStore
NewMockVisibilityStore creates a new mock instance.
func (*MockVisibilityStore) AddSearchAttributes ¶
func (m *MockVisibilityStore) AddSearchAttributes(ctx context.Context, request *manager.AddSearchAttributesRequest) error
AddSearchAttributes mocks base method.
func (*MockVisibilityStore) CountChasmExecutions ¶
func (m *MockVisibilityStore) CountChasmExecutions(ctx context.Context, request *manager.CountChasmExecutionsRequest) (*InternalCountExecutionsResponse, error)
CountChasmExecutions mocks base method.
func (*MockVisibilityStore) CountWorkflowExecutions ¶
func (m *MockVisibilityStore) CountWorkflowExecutions(ctx context.Context, request *manager.CountWorkflowExecutionsRequest) (*InternalCountExecutionsResponse, error)
CountWorkflowExecutions mocks base method.
func (*MockVisibilityStore) DeleteWorkflowExecution ¶
func (m *MockVisibilityStore) DeleteWorkflowExecution(ctx context.Context, request *manager.VisibilityDeleteWorkflowExecutionRequest) error
DeleteWorkflowExecution mocks base method.
func (*MockVisibilityStore) EXPECT ¶
func (m *MockVisibilityStore) EXPECT() *MockVisibilityStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockVisibilityStore) GetIndexName ¶
func (m *MockVisibilityStore) GetIndexName() string
GetIndexName mocks base method.
func (*MockVisibilityStore) GetName ¶
func (m *MockVisibilityStore) GetName() string
GetName mocks base method.
func (*MockVisibilityStore) GetWorkflowExecution ¶
func (m *MockVisibilityStore) GetWorkflowExecution(ctx context.Context, request *manager.GetWorkflowExecutionRequest) (*InternalGetWorkflowExecutionResponse, error)
GetWorkflowExecution mocks base method.
func (*MockVisibilityStore) ListChasmExecutions ¶
func (m *MockVisibilityStore) ListChasmExecutions(ctx context.Context, request *manager.ListChasmExecutionsRequest) (*InternalListExecutionsResponse, error)
ListChasmExecutions mocks base method.
func (*MockVisibilityStore) ListWorkflowExecutions ¶
func (m *MockVisibilityStore) ListWorkflowExecutions(ctx context.Context, request *manager.ListWorkflowExecutionsRequestV2) (*InternalListExecutionsResponse, error)
ListWorkflowExecutions mocks base method.
func (*MockVisibilityStore) RecordWorkflowExecutionClosed ¶
func (m *MockVisibilityStore) RecordWorkflowExecutionClosed(ctx context.Context, request *InternalRecordWorkflowExecutionClosedRequest) error
RecordWorkflowExecutionClosed mocks base method.
func (*MockVisibilityStore) RecordWorkflowExecutionStarted ¶
func (m *MockVisibilityStore) RecordWorkflowExecutionStarted(ctx context.Context, request *InternalRecordWorkflowExecutionStartedRequest) error
RecordWorkflowExecutionStarted mocks base method.
func (*MockVisibilityStore) UpsertWorkflowExecution ¶
func (m *MockVisibilityStore) UpsertWorkflowExecution(ctx context.Context, request *InternalUpsertWorkflowExecutionRequest) error
UpsertWorkflowExecution mocks base method.
func (*MockVisibilityStore) ValidateCustomSearchAttributes ¶
func (m *MockVisibilityStore) ValidateCustomSearchAttributes(searchAttributes map[string]any) (map[string]any, error)
ValidateCustomSearchAttributes mocks base method.
type MockVisibilityStoreMockRecorder ¶
type MockVisibilityStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockVisibilityStoreMockRecorder is the mock recorder for MockVisibilityStore.
func (*MockVisibilityStoreMockRecorder) AddSearchAttributes ¶
func (mr *MockVisibilityStoreMockRecorder) AddSearchAttributes(ctx, request any) *gomock.Call
AddSearchAttributes indicates an expected call of AddSearchAttributes.
func (*MockVisibilityStoreMockRecorder) Close ¶
func (mr *MockVisibilityStoreMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close.
func (*MockVisibilityStoreMockRecorder) CountChasmExecutions ¶
func (mr *MockVisibilityStoreMockRecorder) CountChasmExecutions(ctx, request any) *gomock.Call
CountChasmExecutions indicates an expected call of CountChasmExecutions.
func (*MockVisibilityStoreMockRecorder) CountWorkflowExecutions ¶
func (mr *MockVisibilityStoreMockRecorder) CountWorkflowExecutions(ctx, request any) *gomock.Call
CountWorkflowExecutions indicates an expected call of CountWorkflowExecutions.
func (*MockVisibilityStoreMockRecorder) DeleteWorkflowExecution ¶
func (mr *MockVisibilityStoreMockRecorder) DeleteWorkflowExecution(ctx, request any) *gomock.Call
DeleteWorkflowExecution indicates an expected call of DeleteWorkflowExecution.
func (*MockVisibilityStoreMockRecorder) GetIndexName ¶
func (mr *MockVisibilityStoreMockRecorder) GetIndexName() *gomock.Call
GetIndexName indicates an expected call of GetIndexName.
func (*MockVisibilityStoreMockRecorder) GetName ¶
func (mr *MockVisibilityStoreMockRecorder) GetName() *gomock.Call
GetName indicates an expected call of GetName.
func (*MockVisibilityStoreMockRecorder) GetWorkflowExecution ¶
func (mr *MockVisibilityStoreMockRecorder) GetWorkflowExecution(ctx, request any) *gomock.Call
GetWorkflowExecution indicates an expected call of GetWorkflowExecution.
func (*MockVisibilityStoreMockRecorder) ListChasmExecutions ¶
func (mr *MockVisibilityStoreMockRecorder) ListChasmExecutions(ctx, request any) *gomock.Call
ListChasmExecutions indicates an expected call of ListChasmExecutions.
func (*MockVisibilityStoreMockRecorder) ListWorkflowExecutions ¶
func (mr *MockVisibilityStoreMockRecorder) ListWorkflowExecutions(ctx, request any) *gomock.Call
ListWorkflowExecutions indicates an expected call of ListWorkflowExecutions.
func (*MockVisibilityStoreMockRecorder) RecordWorkflowExecutionClosed ¶
func (mr *MockVisibilityStoreMockRecorder) RecordWorkflowExecutionClosed(ctx, request any) *gomock.Call
RecordWorkflowExecutionClosed indicates an expected call of RecordWorkflowExecutionClosed.
func (*MockVisibilityStoreMockRecorder) RecordWorkflowExecutionStarted ¶
func (mr *MockVisibilityStoreMockRecorder) RecordWorkflowExecutionStarted(ctx, request any) *gomock.Call
RecordWorkflowExecutionStarted indicates an expected call of RecordWorkflowExecutionStarted.
func (*MockVisibilityStoreMockRecorder) UpsertWorkflowExecution ¶
func (mr *MockVisibilityStoreMockRecorder) UpsertWorkflowExecution(ctx, request any) *gomock.Call
UpsertWorkflowExecution indicates an expected call of UpsertWorkflowExecution.
func (*MockVisibilityStoreMockRecorder) ValidateCustomSearchAttributes ¶
func (mr *MockVisibilityStoreMockRecorder) ValidateCustomSearchAttributes(searchAttributes any) *gomock.Call
ValidateCustomSearchAttributes indicates an expected call of ValidateCustomSearchAttributes.
type VisibilityStore ¶
type VisibilityStore interface {
persistence.Closeable
GetName() string
GetIndexName() string
// Validate search attributes based on the store constraints. It returns a new map containing
// only search attributes with valid values. If there are invalid values, it returns error of type
// serviceerror.InvalidArgument.
ValidateCustomSearchAttributes(searchAttributes map[string]any) (map[string]any, error)
// Write APIs.
RecordWorkflowExecutionStarted(ctx context.Context, request *InternalRecordWorkflowExecutionStartedRequest) error
RecordWorkflowExecutionClosed(ctx context.Context, request *InternalRecordWorkflowExecutionClosedRequest) error
UpsertWorkflowExecution(ctx context.Context, request *InternalUpsertWorkflowExecutionRequest) error
DeleteWorkflowExecution(ctx context.Context, request *manager.VisibilityDeleteWorkflowExecutionRequest) error
// Read APIs.
ListWorkflowExecutions(ctx context.Context, request *manager.ListWorkflowExecutionsRequestV2) (*InternalListExecutionsResponse, error)
ListChasmExecutions(ctx context.Context, request *manager.ListChasmExecutionsRequest) (*InternalListExecutionsResponse, error)
CountWorkflowExecutions(ctx context.Context, request *manager.CountWorkflowExecutionsRequest) (*InternalCountExecutionsResponse, error)
CountChasmExecutions(ctx context.Context, request *manager.CountChasmExecutionsRequest) (*InternalCountExecutionsResponse, error)
GetWorkflowExecution(ctx context.Context, request *manager.GetWorkflowExecutionRequest) (*InternalGetWorkflowExecutionResponse, error)
// AddSearchAttributes makes schema changes to add the search attributes. This function must be
// idempotent, ie., if a search attribute already exists, this function must be no-op, and must
// not return any error.
AddSearchAttributes(ctx context.Context, request *manager.AddSearchAttributesRequest) error
}
VisibilityStore is the store interface for visibility
Directories
¶
| Path | Synopsis |
|---|---|
|
Package elasticsearch is a generated GoMock package.
|
Package elasticsearch is a generated GoMock package. |
|
client
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. |