manager

package
v1.9.8 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package manager is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddSearchAttributesRequest

type AddSearchAttributesRequest struct {
	SearchAttributes map[string]enumspb.IndexedValueType
}

type CountChasmExecutionsRequest

type CountChasmExecutionsRequest struct {
	ArchetypeID chasm.ArchetypeID
	NamespaceID namespace.ID
	Namespace   namespace.Name
	Query       string
}

type CountWorkflowExecutionsRequest

type CountWorkflowExecutionsRequest struct {
	NamespaceID namespace.ID
	Namespace   namespace.Name // namespace.Name is not persisted.
	Query       string
}

CountWorkflowExecutionsRequest is request from CountWorkflowExecutions

type CountWorkflowExecutionsResponse

type CountWorkflowExecutionsResponse struct {
	Count  int64 // sum of counts in Groups
	Groups []*workflowservice.CountWorkflowExecutionsResponse_AggregationGroup
}

CountWorkflowExecutionsResponse is response to CountWorkflowExecutions

type GetWorkflowExecutionRequest

type GetWorkflowExecutionRequest struct {
	NamespaceID namespace.ID
	Namespace   namespace.Name // namespace.Name is not persisted
	RunID       string
	WorkflowID  string
}

GetWorkflowExecutionRequest is request from GetWorkflowExecution

type GetWorkflowExecutionResponse

type GetWorkflowExecutionResponse struct {
	Execution *workflowpb.WorkflowExecutionInfo
}

GetWorkflowExecutionResponse is response to GetWorkflowExecution

type ListChasmExecutionsRequest

type ListChasmExecutionsRequest struct {
	ArchetypeID chasm.ArchetypeID
	NamespaceID namespace.ID
	Namespace   namespace.Name
	PageSize    int // Maximum number of workflow executions per page
	Query       string
	// Token to continue reading next page of workflow executions.
	// Pass in empty slice for first page.
	NextPageToken []byte
}

type ListWorkflowExecutionsRequest

type ListWorkflowExecutionsRequest struct {
	NamespaceID       namespace.ID
	Namespace         namespace.Name // namespace.Name is not persisted.
	NamespaceDivision string
	EarliestStartTime time.Time
	LatestStartTime   time.Time
	// Maximum number of workflow executions per page
	PageSize int
	// Token to continue reading next page of workflow executions.
	// Pass in empty slice for first page.
	NextPageToken []byte
}

ListWorkflowExecutionsRequest is used to list executions in a namespace

func (*ListWorkflowExecutionsRequest) GetPageSize

func (r *ListWorkflowExecutionsRequest) GetPageSize() int

func (*ListWorkflowExecutionsRequest) GetToken

func (r *ListWorkflowExecutionsRequest) GetToken() []byte

func (*ListWorkflowExecutionsRequest) OverridePageSize

func (r *ListWorkflowExecutionsRequest) OverridePageSize(pageSize int)

func (*ListWorkflowExecutionsRequest) OverrideToken

func (r *ListWorkflowExecutionsRequest) OverrideToken(token []byte)

type ListWorkflowExecutionsRequestV2

type ListWorkflowExecutionsRequestV2 struct {
	NamespaceID namespace.ID
	Namespace   namespace.Name // namespace.Name is not persisted.
	PageSize    int            // Maximum number of workflow executions per page
	// Token to continue reading next page of workflow executions.
	// Pass in empty slice for first page.
	NextPageToken []byte
	Query         string
}

ListWorkflowExecutionsRequestV2 is used to list executions in a namespace

type ListWorkflowExecutionsResponse

type ListWorkflowExecutionsResponse struct {
	Executions []*workflowpb.WorkflowExecutionInfo
	// 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
}

ListWorkflowExecutionsResponse is the response to ListWorkflowExecutionsRequest

type MockVisibilityManager

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

MockVisibilityManager is a mock of VisibilityManager interface.

func NewMockVisibilityManager

func NewMockVisibilityManager(ctrl *gomock.Controller) *MockVisibilityManager

NewMockVisibilityManager creates a new mock instance.

func (*MockVisibilityManager) AddSearchAttributes

func (m *MockVisibilityManager) AddSearchAttributes(ctx context.Context, request *AddSearchAttributesRequest) error

AddSearchAttributes mocks base method.

func (*MockVisibilityManager) Close

func (m *MockVisibilityManager) Close()

Close mocks base method.

func (*MockVisibilityManager) CountChasmExecutions

CountChasmExecutions mocks base method.

func (*MockVisibilityManager) CountWorkflowExecutions

CountWorkflowExecutions mocks base method.

func (*MockVisibilityManager) DeleteWorkflowExecution

func (m *MockVisibilityManager) DeleteWorkflowExecution(ctx context.Context, request *VisibilityDeleteWorkflowExecutionRequest) error

DeleteWorkflowExecution mocks base method.

func (*MockVisibilityManager) EXPECT

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

func (*MockVisibilityManager) GetIndexName

func (m *MockVisibilityManager) GetIndexName() string

GetIndexName mocks base method.

func (*MockVisibilityManager) GetReadStoreName

func (m *MockVisibilityManager) GetReadStoreName(nsName namespace.Name) string

GetReadStoreName mocks base method.

func (*MockVisibilityManager) GetStoreNames

func (m *MockVisibilityManager) GetStoreNames() []string

GetStoreNames mocks base method.

func (*MockVisibilityManager) GetWorkflowExecution

GetWorkflowExecution mocks base method.

func (*MockVisibilityManager) HasStoreName

func (m *MockVisibilityManager) HasStoreName(stName string) bool

HasStoreName mocks base method.

func (*MockVisibilityManager) ListChasmExecutions

ListChasmExecutions mocks base method.

func (*MockVisibilityManager) ListWorkflowExecutions

ListWorkflowExecutions mocks base method.

func (*MockVisibilityManager) RecordWorkflowExecutionClosed

func (m *MockVisibilityManager) RecordWorkflowExecutionClosed(ctx context.Context, request *RecordWorkflowExecutionClosedRequest) error

RecordWorkflowExecutionClosed mocks base method.

func (*MockVisibilityManager) RecordWorkflowExecutionStarted

func (m *MockVisibilityManager) RecordWorkflowExecutionStarted(ctx context.Context, request *RecordWorkflowExecutionStartedRequest) error

RecordWorkflowExecutionStarted mocks base method.

func (*MockVisibilityManager) UpsertWorkflowExecution

func (m *MockVisibilityManager) UpsertWorkflowExecution(ctx context.Context, request *UpsertWorkflowExecutionRequest) error

UpsertWorkflowExecution mocks base method.

func (*MockVisibilityManager) ValidateCustomSearchAttributes

func (m *MockVisibilityManager) ValidateCustomSearchAttributes(searchAttributes map[string]any) (map[string]any, error)

ValidateCustomSearchAttributes mocks base method.

type MockVisibilityManagerMockRecorder

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

MockVisibilityManagerMockRecorder is the mock recorder for MockVisibilityManager.

func (*MockVisibilityManagerMockRecorder) AddSearchAttributes

func (mr *MockVisibilityManagerMockRecorder) AddSearchAttributes(ctx, request any) *gomock.Call

AddSearchAttributes indicates an expected call of AddSearchAttributes.

func (*MockVisibilityManagerMockRecorder) Close

Close indicates an expected call of Close.

func (*MockVisibilityManagerMockRecorder) CountChasmExecutions

func (mr *MockVisibilityManagerMockRecorder) CountChasmExecutions(ctx, request any) *gomock.Call

CountChasmExecutions indicates an expected call of CountChasmExecutions.

func (*MockVisibilityManagerMockRecorder) CountWorkflowExecutions

func (mr *MockVisibilityManagerMockRecorder) CountWorkflowExecutions(ctx, request any) *gomock.Call

CountWorkflowExecutions indicates an expected call of CountWorkflowExecutions.

func (*MockVisibilityManagerMockRecorder) DeleteWorkflowExecution

func (mr *MockVisibilityManagerMockRecorder) DeleteWorkflowExecution(ctx, request any) *gomock.Call

DeleteWorkflowExecution indicates an expected call of DeleteWorkflowExecution.

func (*MockVisibilityManagerMockRecorder) GetIndexName

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

GetIndexName indicates an expected call of GetIndexName.

func (*MockVisibilityManagerMockRecorder) GetReadStoreName

func (mr *MockVisibilityManagerMockRecorder) GetReadStoreName(nsName any) *gomock.Call

GetReadStoreName indicates an expected call of GetReadStoreName.

func (*MockVisibilityManagerMockRecorder) GetStoreNames

func (mr *MockVisibilityManagerMockRecorder) GetStoreNames() *gomock.Call

GetStoreNames indicates an expected call of GetStoreNames.

func (*MockVisibilityManagerMockRecorder) GetWorkflowExecution

func (mr *MockVisibilityManagerMockRecorder) GetWorkflowExecution(ctx, request any) *gomock.Call

GetWorkflowExecution indicates an expected call of GetWorkflowExecution.

func (*MockVisibilityManagerMockRecorder) HasStoreName

func (mr *MockVisibilityManagerMockRecorder) HasStoreName(stName any) *gomock.Call

HasStoreName indicates an expected call of HasStoreName.

func (*MockVisibilityManagerMockRecorder) ListChasmExecutions

func (mr *MockVisibilityManagerMockRecorder) ListChasmExecutions(ctx, request any) *gomock.Call

ListChasmExecutions indicates an expected call of ListChasmExecutions.

func (*MockVisibilityManagerMockRecorder) ListWorkflowExecutions

func (mr *MockVisibilityManagerMockRecorder) ListWorkflowExecutions(ctx, request any) *gomock.Call

ListWorkflowExecutions indicates an expected call of ListWorkflowExecutions.

func (*MockVisibilityManagerMockRecorder) RecordWorkflowExecutionClosed

func (mr *MockVisibilityManagerMockRecorder) RecordWorkflowExecutionClosed(ctx, request any) *gomock.Call

RecordWorkflowExecutionClosed indicates an expected call of RecordWorkflowExecutionClosed.

func (*MockVisibilityManagerMockRecorder) RecordWorkflowExecutionStarted

func (mr *MockVisibilityManagerMockRecorder) RecordWorkflowExecutionStarted(ctx, request any) *gomock.Call

RecordWorkflowExecutionStarted indicates an expected call of RecordWorkflowExecutionStarted.

func (*MockVisibilityManagerMockRecorder) UpsertWorkflowExecution

func (mr *MockVisibilityManagerMockRecorder) UpsertWorkflowExecution(ctx, request any) *gomock.Call

UpsertWorkflowExecution indicates an expected call of UpsertWorkflowExecution.

func (*MockVisibilityManagerMockRecorder) ValidateCustomSearchAttributes

func (mr *MockVisibilityManagerMockRecorder) ValidateCustomSearchAttributes(searchAttributes any) *gomock.Call

ValidateCustomSearchAttributes indicates an expected call of ValidateCustomSearchAttributes.

type RecordWorkflowExecutionClosedRequest

type RecordWorkflowExecutionClosedRequest struct {
	*VisibilityRequestBase
	CloseTime            time.Time
	ExecutionDuration    time.Duration
	HistoryLength        int64
	HistorySizeBytes     int64
	StateTransitionCount int64
}

RecordWorkflowExecutionClosedRequest is used to add a record of a closed execution

type RecordWorkflowExecutionStartedRequest

type RecordWorkflowExecutionStartedRequest struct {
	*VisibilityRequestBase
}

RecordWorkflowExecutionStartedRequest is used to add a record of a newly started execution

type UpsertWorkflowExecutionRequest

type UpsertWorkflowExecutionRequest struct {
	*VisibilityRequestBase
}

UpsertWorkflowExecutionRequest is used to upsert workflow execution

type VisibilityDeleteWorkflowExecutionRequest

type VisibilityDeleteWorkflowExecutionRequest struct {
	NamespaceID namespace.ID
	RunID       string
	WorkflowID  string
	TaskID      int64
	CloseTime   *time.Time
}

VisibilityDeleteWorkflowExecutionRequest contains the request params for DeleteWorkflowExecution call

type VisibilityManager

type VisibilityManager interface {
	persistence.Closeable
	GetReadStoreName(nsName namespace.Name) string
	GetStoreNames() []string
	HasStoreName(stName string) bool
	GetIndexName() string
	ValidateCustomSearchAttributes(searchAttributes map[string]any) (map[string]any, error)

	// Write APIs.
	RecordWorkflowExecutionStarted(ctx context.Context, request *RecordWorkflowExecutionStartedRequest) error
	RecordWorkflowExecutionClosed(ctx context.Context, request *RecordWorkflowExecutionClosedRequest) error
	UpsertWorkflowExecution(ctx context.Context, request *UpsertWorkflowExecutionRequest) error
	DeleteWorkflowExecution(ctx context.Context, request *VisibilityDeleteWorkflowExecutionRequest) error

	// Read APIs.
	ListWorkflowExecutions(ctx context.Context, request *ListWorkflowExecutionsRequestV2) (*ListWorkflowExecutionsResponse, error)
	ListChasmExecutions(ctx context.Context, request *ListChasmExecutionsRequest) (*chasm.ListExecutionsResponse[*commonpb.Payload], error)
	CountWorkflowExecutions(ctx context.Context, request *CountWorkflowExecutionsRequest) (*CountWorkflowExecutionsResponse, error)
	CountChasmExecutions(ctx context.Context, request *CountChasmExecutionsRequest) (*chasm.CountExecutionsResponse, error)
	GetWorkflowExecution(ctx context.Context, request *GetWorkflowExecutionRequest) (*GetWorkflowExecutionResponse, error)

	// Admin APIs
	AddSearchAttributes(ctx context.Context, request *AddSearchAttributesRequest) error
}

VisibilityManager is used to manage the visibility store

type VisibilityRequestBase

type VisibilityRequestBase struct {
	NamespaceID      namespace.ID
	Namespace        namespace.Name // namespace.Name is not persisted.
	Execution        *commonpb.WorkflowExecution
	WorkflowTypeName string
	StartTime        time.Time
	Status           enumspb.WorkflowExecutionStatus
	ExecutionTime    time.Time
	TaskID           int64 // used as condition update version for ES and _version for SQL stores
	ShardID          int32 // not persisted
	Memo             *commonpb.Memo
	TaskQueue        string
	SearchAttributes *commonpb.SearchAttributes
	ParentExecution  *commonpb.WorkflowExecution
	RootExecution    *commonpb.WorkflowExecution
}

Jump to

Keyboard shortcuts

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