ndc

package
v1.2.13-prerelease06 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package ndc is a generated GoMock package.

Package ndc is a generated GoMock package.

Package ndc is a generated GoMock package.

Package ndc is a generated GoMock package.

Package ndc is a generated GoMock package.

Package ndc is a generated GoMock package.

Package ndc is a generated GoMock package.

Package ndc is a generated GoMock package.

Package ndc is a generated GoMock package.

Index

Constants

View Source
const (

	// EventsReapplicationResetWorkflowReason is the reason for reset workflow during reapplication
	EventsReapplicationResetWorkflowReason = "events-reapplication"
)

Variables

View Source
var (
	// ErrInvalidDomainID is returned if domain ID is invalid
	ErrInvalidDomainID = &types.BadRequestError{Message: "invalid domain ID"}
	// ErrInvalidExecution is returned if execution is invalid
	ErrInvalidExecution = &types.BadRequestError{Message: "invalid execution"}
	// ErrInvalidRunID is returned if run ID is invalid
	ErrInvalidRunID = &types.BadRequestError{Message: "invalid run ID"}
	// ErrEventIDMismatch is returned if event ID mis-matched
	ErrEventIDMismatch = &types.BadRequestError{Message: "event ID mismatch"}
	// ErrEventVersionMismatch is returned if event version mis-matched
	ErrEventVersionMismatch = &types.BadRequestError{Message: "event version mismatch"}
	// ErrNoNewRunHistory is returned if there is no new run history
	ErrNoNewRunHistory = &types.BadRequestError{Message: "no new run history events"}
	// ErrLastEventIsNotContinueAsNew is returned if the last event is not continue as new
	ErrLastEventIsNotContinueAsNew = &types.BadRequestError{Message: "last event is not continue as new"}
	// ErrEmptyHistoryRawEventBatch indicate that one single batch of history raw events is of size 0
	ErrEmptyHistoryRawEventBatch = &types.BadRequestError{Message: "encounter empty history batch"}
)

Functions

This section is empty.

Types

type ActivityReplicator

type ActivityReplicator interface {
	SyncActivity(
		ctx ctx.Context,
		request *types.SyncActivityRequest,
	) error
}

ActivityReplicator handles sync activity process

func NewActivityReplicator

func NewActivityReplicator(
	shard shard.Context,
	executionCache execution.Cache,
	logger log.Logger,
) ActivityReplicator

NewActivityReplicator creates activity replicator

type EventsReapplier

type EventsReapplier interface {
	ReapplyEvents(
		ctx ctx.Context,
		msBuilder execution.MutableState,
		historyEvents []*types.HistoryEvent,
		runID string,
	) ([]*types.HistoryEvent, error)
}

EventsReapplier handles event re-application

func NewEventsReapplier

func NewEventsReapplier(
	metricsClient metrics.Client,
	logger log.Logger,
) EventsReapplier

NewEventsReapplier creates events reapplier

type HistoryReplicator

type HistoryReplicator interface {
	ApplyEvents(
		ctx ctx.Context,
		request *types.ReplicateEventsV2Request,
	) error
}

HistoryReplicator handles history replication task

func NewHistoryReplicator

func NewHistoryReplicator(
	shard shard.Context,
	executionCache execution.Cache,
	eventsReapplier EventsReapplier,
	logger log.Logger,
) HistoryReplicator

NewHistoryReplicator creates history replicator

type MockActivityReplicator

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

MockActivityReplicator is a mock of ActivityReplicator interface.

func NewMockActivityReplicator

func NewMockActivityReplicator(ctrl *gomock.Controller) *MockActivityReplicator

NewMockActivityReplicator creates a new mock instance.

func (*MockActivityReplicator) EXPECT

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

func (*MockActivityReplicator) SyncActivity

func (m *MockActivityReplicator) SyncActivity(ctx context.Context, request *types.SyncActivityRequest) error

SyncActivity mocks base method.

type MockActivityReplicatorMockRecorder

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

MockActivityReplicatorMockRecorder is the mock recorder for MockActivityReplicator.

func (*MockActivityReplicatorMockRecorder) SyncActivity

func (mr *MockActivityReplicatorMockRecorder) SyncActivity(ctx, request interface{}) *gomock.Call

SyncActivity indicates an expected call of SyncActivity.

type MockEventsReapplier

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

MockEventsReapplier is a mock of EventsReapplier interface.

func NewMockEventsReapplier

func NewMockEventsReapplier(ctrl *gomock.Controller) *MockEventsReapplier

NewMockEventsReapplier creates a new mock instance.

func (*MockEventsReapplier) EXPECT

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

func (*MockEventsReapplier) ReapplyEvents

func (m *MockEventsReapplier) ReapplyEvents(ctx context.Context, msBuilder execution.MutableState, historyEvents []*types.HistoryEvent, runID string) ([]*types.HistoryEvent, error)

ReapplyEvents mocks base method.

type MockEventsReapplierMockRecorder

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

MockEventsReapplierMockRecorder is the mock recorder for MockEventsReapplier.

func (*MockEventsReapplierMockRecorder) ReapplyEvents

func (mr *MockEventsReapplierMockRecorder) ReapplyEvents(ctx, msBuilder, historyEvents, runID interface{}) *gomock.Call

ReapplyEvents indicates an expected call of ReapplyEvents.

type MockWorkflowResetter

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

MockWorkflowResetter is a mock of WorkflowResetter interface.

func NewMockWorkflowResetter

func NewMockWorkflowResetter(ctrl *gomock.Controller) *MockWorkflowResetter

NewMockWorkflowResetter creates a new mock instance.

func (*MockWorkflowResetter) EXPECT

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

func (*MockWorkflowResetter) ResetWorkflow

func (m *MockWorkflowResetter) ResetWorkflow(ctx context.Context, now time.Time, baseLastEventID, baseLastEventVersion, incomingFirstEventID, incomingFirstEventVersion int64) (execution.MutableState, error)

ResetWorkflow mocks base method.

type MockWorkflowResetterMockRecorder

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

MockWorkflowResetterMockRecorder is the mock recorder for MockWorkflowResetter.

func (*MockWorkflowResetterMockRecorder) ResetWorkflow

func (mr *MockWorkflowResetterMockRecorder) ResetWorkflow(ctx, now, baseLastEventID, baseLastEventVersion, incomingFirstEventID, incomingFirstEventVersion interface{}) *gomock.Call

ResetWorkflow indicates an expected call of ResetWorkflow.

type MockbranchManager

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

MockbranchManager is a mock of branchManager interface.

func NewMockbranchManager

func NewMockbranchManager(ctrl *gomock.Controller) *MockbranchManager

NewMockbranchManager creates a new mock instance.

func (*MockbranchManager) EXPECT

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

type MockbranchManagerMockRecorder

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

MockbranchManagerMockRecorder is the mock recorder for MockbranchManager.

type MockconflictResolver

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

MockconflictResolver is a mock of conflictResolver interface.

func NewMockconflictResolver

func NewMockconflictResolver(ctrl *gomock.Controller) *MockconflictResolver

NewMockconflictResolver creates a new mock instance.

func (*MockconflictResolver) EXPECT

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

type MockconflictResolverMockRecorder

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

MockconflictResolverMockRecorder is the mock recorder for MockconflictResolver.

type MockreplicationTask added in v1.2.11

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

MockreplicationTask is a mock of replicationTask interface.

func NewMockreplicationTask added in v1.2.11

func NewMockreplicationTask(ctrl *gomock.Controller) *MockreplicationTask

NewMockreplicationTask creates a new mock instance.

func (*MockreplicationTask) EXPECT added in v1.2.11

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

type MockreplicationTaskMockRecorder added in v1.2.11

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

MockreplicationTaskMockRecorder is the mock recorder for MockreplicationTask.

type MocktransactionManager

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

MocktransactionManager is a mock of transactionManager interface.

func NewMocktransactionManager

func NewMocktransactionManager(ctrl *gomock.Controller) *MocktransactionManager

NewMocktransactionManager creates a new mock instance.

func (*MocktransactionManager) EXPECT

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

type MocktransactionManagerForExistingWorkflow

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

MocktransactionManagerForExistingWorkflow is a mock of transactionManagerForExistingWorkflow interface.

func NewMocktransactionManagerForExistingWorkflow

func NewMocktransactionManagerForExistingWorkflow(ctrl *gomock.Controller) *MocktransactionManagerForExistingWorkflow

NewMocktransactionManagerForExistingWorkflow creates a new mock instance.

func (*MocktransactionManagerForExistingWorkflow) EXPECT

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

type MocktransactionManagerForExistingWorkflowMockRecorder

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

MocktransactionManagerForExistingWorkflowMockRecorder is the mock recorder for MocktransactionManagerForExistingWorkflow.

type MocktransactionManagerForNewWorkflow

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

MocktransactionManagerForNewWorkflow is a mock of transactionManagerForNewWorkflow interface.

func NewMocktransactionManagerForNewWorkflow

func NewMocktransactionManagerForNewWorkflow(ctrl *gomock.Controller) *MocktransactionManagerForNewWorkflow

NewMocktransactionManagerForNewWorkflow creates a new mock instance.

func (*MocktransactionManagerForNewWorkflow) EXPECT

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

type MocktransactionManagerForNewWorkflowMockRecorder

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

MocktransactionManagerForNewWorkflowMockRecorder is the mock recorder for MocktransactionManagerForNewWorkflow.

type MocktransactionManagerMockRecorder

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

MocktransactionManagerMockRecorder is the mock recorder for MocktransactionManager.

type WorkflowResetter

type WorkflowResetter interface {
	ResetWorkflow(
		ctx context.Context,
		now time.Time,
		baseLastEventID int64,
		baseLastEventVersion int64,
		incomingFirstEventID int64,
		incomingFirstEventVersion int64,
	) (execution.MutableState, error)
}

WorkflowResetter handles workflow reset for NDC

func NewWorkflowResetter

func NewWorkflowResetter(
	shard shard.Context,
	transactionManager transactionManager,
	domainID string,
	workflowID string,
	baseRunID string,
	newContext execution.Context,
	newRunID string,
	logger log.Logger,
) WorkflowResetter

NewWorkflowResetter creates workflow resetter

Jump to

Keyboard shortcuts

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