ndc

package
v0.14.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: MIT Imports: 22 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.

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 = &shared.BadRequestError{Message: "invalid domain ID"}
	// ErrInvalidExecution is returned if execution is invalid
	ErrInvalidExecution = &shared.BadRequestError{Message: "invalid execution"}
	// ErrInvalidRunID is returned if run ID is invalid
	ErrInvalidRunID = &shared.BadRequestError{Message: "invalid run ID"}
	// ErrEventIDMismatch is returned if event ID mis-matched
	ErrEventIDMismatch = &shared.BadRequestError{Message: "event ID mismatch"}
	// ErrEventVersionMismatch is returned if event version mis-matched
	ErrEventVersionMismatch = &shared.BadRequestError{Message: "event version mismatch"}
	// ErrNoNewRunHistory is returned if there is no new run history
	ErrNoNewRunHistory = &shared.BadRequestError{Message: "no new run history events"}
	// ErrLastEventIsNotContinueAsNew is returned if the last event is not continue as new
	ErrLastEventIsNotContinueAsNew = &shared.BadRequestError{Message: "last event is not continue as new"}
	// ErrEmptyHistoryRawEventBatch indicate that one single batch of history raw events is of size 0
	ErrEmptyHistoryRawEventBatch = &shared.BadRequestError{Message: "encounter empty history batch"}
)

Functions

func NewRetryTaskErrorWithHint

func NewRetryTaskErrorWithHint(
	msg string,
	domainID string,
	workflowID string,
	runID string,
	nextEventID int64,
) *workflow.RetryTaskError

NewRetryTaskErrorWithHint returns a 2DC resend error TODO: remove it after remove 2DC code

Types

type ActivityReplicator

type ActivityReplicator interface {
	SyncActivity(
		ctx ctx.Context,
		request *h.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 []*workflow.HistoryEvent,
		runID string,
	) ([]*workflow.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 *h.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 *history.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 []*shared.HistoryEvent, runID string) ([]*shared.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 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 ctx.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