store

package
v1.21.5-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: MIT Imports: 10 Imported by: 2

Documentation

Overview

Package store is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	// OperationNotSupportedErr is returned when visibility operation in not supported.
	OperationNotSupportedErr = serviceerror.NewInvalidArgument("Operation not supported. Please use on Elasticsearch")
)

Functions

func NewVisibilityStoreInvalidValuesError added in v1.21.3

func NewVisibilityStoreInvalidValuesError(errs []error) error

Types

type InternalGetWorkflowExecutionResponse added in v1.19.0

type InternalGetWorkflowExecutionResponse struct {
	Execution *InternalWorkflowExecutionInfo
}

InternalGetWorkflowExecutionResponse is response from GetWorkflowExecution

type InternalListWorkflowExecutionsResponse

type InternalListWorkflowExecutionsResponse struct {
	Executions []*InternalWorkflowExecutionInfo
	// 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
}

InternalListWorkflowExecutionsResponse is response from ListWorkflowExecutions

type InternalRecordWorkflowExecutionClosedRequest

type InternalRecordWorkflowExecutionClosedRequest struct {
	*InternalVisibilityRequestBase
	CloseTime        time.Time
	HistoryLength    int64
	HistorySizeBytes 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
	StateTransitionCount int64
	TaskID               int64
	ShardID              int32
	Memo                 *commonpb.DataBlob
	TaskQueue            string
	SearchAttributes     *commonpb.SearchAttributes
}

InternalVisibilityRequestBase is a base request to visibility APIs.

type InternalWorkflowExecutionInfo

type InternalWorkflowExecutionInfo struct {
	WorkflowID           string
	RunID                string
	TypeName             string
	StartTime            time.Time
	ExecutionTime        time.Time
	CloseTime            time.Time
	Status               enumspb.WorkflowExecutionStatus
	HistoryLength        int64
	StateTransitionCount int64
	Memo                 *commonpb.DataBlob
	TaskQueue            string
	SearchAttributes     *commonpb.SearchAttributes
	HistorySizeBytes     int64
}

InternalWorkflowExecutionInfo is visibility info for internal response

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) Close

func (m *MockVisibilityStore) Close()

Close mocks base method.

func (*MockVisibilityStore) CountWorkflowExecutions

CountWorkflowExecutions mocks base method.

func (*MockVisibilityStore) DeleteWorkflowExecution

DeleteWorkflowExecution mocks base method.

func (*MockVisibilityStore) EXPECT

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

func (*MockVisibilityStore) GetIndexName added in v1.20.0

func (m *MockVisibilityStore) GetIndexName() string

GetIndexName mocks base method.

func (*MockVisibilityStore) GetName

func (m *MockVisibilityStore) GetName() string

GetName mocks base method.

func (*MockVisibilityStore) GetWorkflowExecution added in v1.19.0

GetWorkflowExecution mocks base method.

func (*MockVisibilityStore) ListClosedWorkflowExecutions

ListClosedWorkflowExecutions mocks base method.

func (*MockVisibilityStore) ListClosedWorkflowExecutionsByStatus

ListClosedWorkflowExecutionsByStatus mocks base method.

func (*MockVisibilityStore) ListClosedWorkflowExecutionsByType

ListClosedWorkflowExecutionsByType mocks base method.

func (*MockVisibilityStore) ListClosedWorkflowExecutionsByWorkflowID

ListClosedWorkflowExecutionsByWorkflowID mocks base method.

func (*MockVisibilityStore) ListOpenWorkflowExecutions

ListOpenWorkflowExecutions mocks base method.

func (*MockVisibilityStore) ListOpenWorkflowExecutionsByType

ListOpenWorkflowExecutionsByType mocks base method.

func (*MockVisibilityStore) ListOpenWorkflowExecutionsByWorkflowID

ListOpenWorkflowExecutionsByWorkflowID mocks base method.

func (*MockVisibilityStore) ListWorkflowExecutions

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) ScanWorkflowExecutions

ScanWorkflowExecutions mocks base method.

func (*MockVisibilityStore) UpsertWorkflowExecution

func (m *MockVisibilityStore) UpsertWorkflowExecution(ctx context.Context, request *InternalUpsertWorkflowExecutionRequest) error

UpsertWorkflowExecution mocks base method.

func (*MockVisibilityStore) ValidateCustomSearchAttributes added in v1.21.3

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) Close

Close indicates an expected call of Close.

func (*MockVisibilityStoreMockRecorder) CountWorkflowExecutions

func (mr *MockVisibilityStoreMockRecorder) CountWorkflowExecutions(ctx, request interface{}) *gomock.Call

CountWorkflowExecutions indicates an expected call of CountWorkflowExecutions.

func (*MockVisibilityStoreMockRecorder) DeleteWorkflowExecution

func (mr *MockVisibilityStoreMockRecorder) DeleteWorkflowExecution(ctx, request interface{}) *gomock.Call

DeleteWorkflowExecution indicates an expected call of DeleteWorkflowExecution.

func (*MockVisibilityStoreMockRecorder) GetIndexName added in v1.20.0

func (mr *MockVisibilityStoreMockRecorder) GetIndexName() *gomock.Call

GetIndexName indicates an expected call of GetIndexName.

func (*MockVisibilityStoreMockRecorder) GetName

GetName indicates an expected call of GetName.

func (*MockVisibilityStoreMockRecorder) GetWorkflowExecution added in v1.19.0

func (mr *MockVisibilityStoreMockRecorder) GetWorkflowExecution(ctx, request interface{}) *gomock.Call

GetWorkflowExecution indicates an expected call of GetWorkflowExecution.

func (*MockVisibilityStoreMockRecorder) ListClosedWorkflowExecutions

func (mr *MockVisibilityStoreMockRecorder) ListClosedWorkflowExecutions(ctx, request interface{}) *gomock.Call

ListClosedWorkflowExecutions indicates an expected call of ListClosedWorkflowExecutions.

func (*MockVisibilityStoreMockRecorder) ListClosedWorkflowExecutionsByStatus

func (mr *MockVisibilityStoreMockRecorder) ListClosedWorkflowExecutionsByStatus(ctx, request interface{}) *gomock.Call

ListClosedWorkflowExecutionsByStatus indicates an expected call of ListClosedWorkflowExecutionsByStatus.

func (*MockVisibilityStoreMockRecorder) ListClosedWorkflowExecutionsByType

func (mr *MockVisibilityStoreMockRecorder) ListClosedWorkflowExecutionsByType(ctx, request interface{}) *gomock.Call

ListClosedWorkflowExecutionsByType indicates an expected call of ListClosedWorkflowExecutionsByType.

func (*MockVisibilityStoreMockRecorder) ListClosedWorkflowExecutionsByWorkflowID

func (mr *MockVisibilityStoreMockRecorder) ListClosedWorkflowExecutionsByWorkflowID(ctx, request interface{}) *gomock.Call

ListClosedWorkflowExecutionsByWorkflowID indicates an expected call of ListClosedWorkflowExecutionsByWorkflowID.

func (*MockVisibilityStoreMockRecorder) ListOpenWorkflowExecutions

func (mr *MockVisibilityStoreMockRecorder) ListOpenWorkflowExecutions(ctx, request interface{}) *gomock.Call

ListOpenWorkflowExecutions indicates an expected call of ListOpenWorkflowExecutions.

func (*MockVisibilityStoreMockRecorder) ListOpenWorkflowExecutionsByType

func (mr *MockVisibilityStoreMockRecorder) ListOpenWorkflowExecutionsByType(ctx, request interface{}) *gomock.Call

ListOpenWorkflowExecutionsByType indicates an expected call of ListOpenWorkflowExecutionsByType.

func (*MockVisibilityStoreMockRecorder) ListOpenWorkflowExecutionsByWorkflowID

func (mr *MockVisibilityStoreMockRecorder) ListOpenWorkflowExecutionsByWorkflowID(ctx, request interface{}) *gomock.Call

ListOpenWorkflowExecutionsByWorkflowID indicates an expected call of ListOpenWorkflowExecutionsByWorkflowID.

func (*MockVisibilityStoreMockRecorder) ListWorkflowExecutions

func (mr *MockVisibilityStoreMockRecorder) ListWorkflowExecutions(ctx, request interface{}) *gomock.Call

ListWorkflowExecutions indicates an expected call of ListWorkflowExecutions.

func (*MockVisibilityStoreMockRecorder) RecordWorkflowExecutionClosed

func (mr *MockVisibilityStoreMockRecorder) RecordWorkflowExecutionClosed(ctx, request interface{}) *gomock.Call

RecordWorkflowExecutionClosed indicates an expected call of RecordWorkflowExecutionClosed.

func (*MockVisibilityStoreMockRecorder) RecordWorkflowExecutionStarted

func (mr *MockVisibilityStoreMockRecorder) RecordWorkflowExecutionStarted(ctx, request interface{}) *gomock.Call

RecordWorkflowExecutionStarted indicates an expected call of RecordWorkflowExecutionStarted.

func (*MockVisibilityStoreMockRecorder) ScanWorkflowExecutions

func (mr *MockVisibilityStoreMockRecorder) ScanWorkflowExecutions(ctx, request interface{}) *gomock.Call

ScanWorkflowExecutions indicates an expected call of ScanWorkflowExecutions.

func (*MockVisibilityStoreMockRecorder) UpsertWorkflowExecution

func (mr *MockVisibilityStoreMockRecorder) UpsertWorkflowExecution(ctx, request interface{}) *gomock.Call

UpsertWorkflowExecution indicates an expected call of UpsertWorkflowExecution.

func (*MockVisibilityStoreMockRecorder) ValidateCustomSearchAttributes added in v1.21.3

func (mr *MockVisibilityStoreMockRecorder) ValidateCustomSearchAttributes(searchAttributes interface{}) *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, an error of type
	// VisibilityStoreInvalidValuesError wraps all invalid values errors.
	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.
	ListOpenWorkflowExecutions(ctx context.Context, request *manager.ListWorkflowExecutionsRequest) (*InternalListWorkflowExecutionsResponse, error)
	ListClosedWorkflowExecutions(ctx context.Context, request *manager.ListWorkflowExecutionsRequest) (*InternalListWorkflowExecutionsResponse, error)
	ListOpenWorkflowExecutionsByType(ctx context.Context, request *manager.ListWorkflowExecutionsByTypeRequest) (*InternalListWorkflowExecutionsResponse, error)
	ListClosedWorkflowExecutionsByType(ctx context.Context, request *manager.ListWorkflowExecutionsByTypeRequest) (*InternalListWorkflowExecutionsResponse, error)
	ListOpenWorkflowExecutionsByWorkflowID(ctx context.Context, request *manager.ListWorkflowExecutionsByWorkflowIDRequest) (*InternalListWorkflowExecutionsResponse, error)
	ListClosedWorkflowExecutionsByWorkflowID(ctx context.Context, request *manager.ListWorkflowExecutionsByWorkflowIDRequest) (*InternalListWorkflowExecutionsResponse, error)
	ListClosedWorkflowExecutionsByStatus(ctx context.Context, request *manager.ListClosedWorkflowExecutionsByStatusRequest) (*InternalListWorkflowExecutionsResponse, error)
	ListWorkflowExecutions(ctx context.Context, request *manager.ListWorkflowExecutionsRequestV2) (*InternalListWorkflowExecutionsResponse, error)
	ScanWorkflowExecutions(ctx context.Context, request *manager.ListWorkflowExecutionsRequestV2) (*InternalListWorkflowExecutionsResponse, error)
	CountWorkflowExecutions(ctx context.Context, request *manager.CountWorkflowExecutionsRequest) (*manager.CountWorkflowExecutionsResponse, error)
	GetWorkflowExecution(ctx context.Context, request *manager.GetWorkflowExecutionRequest) (*InternalGetWorkflowExecutionResponse, error)
}

VisibilityStore is the store interface for visibility

type VisibilityStoreInvalidValuesError added in v1.21.3

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

func (*VisibilityStoreInvalidValuesError) Error added in v1.21.3

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.
sql

Jump to

Keyboard shortcuts

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