client

package
v1.20.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 29 Imported by: 3

Documentation

Overview

Package client is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	CallerTypeDefaultPriority = map[string]int{
		headers.CallerTypeAPI:         1,
		headers.CallerTypeBackground:  3,
		headers.CallerTypePreemptable: 4,
	}

	APITypeCallOriginPriorityOverride = map[string]int{
		"StartWorkflowExecution":           0,
		"SignalWithStartWorkflowExecution": 0,
		"SignalWorkflowExecution":          0,
		"RequestCancelWorkflowExecution":   0,
		"TerminateWorkflowExecution":       0,
		"GetWorkflowExecutionHistory":      0,
		"UpdateWorkflowExecution":          0,
	}

	BackgroundTypeAPIPriorityOverride = map[string]int{
		"GetOrCreateShard": 0,
		"UpdateShard":      0,

		p.ConstructHistoryTaskAPI("RangeCompleteHistoryTasks", tasks.CategoryTransfer):   0,
		p.ConstructHistoryTaskAPI("RangeCompleteHistoryTasks", tasks.CategoryTimer):      0,
		p.ConstructHistoryTaskAPI("RangeCompleteHistoryTasks", tasks.CategoryVisibility): 0,

		p.ConstructHistoryTaskAPI("GetHistoryTasks", tasks.CategoryTransfer):   2,
		p.ConstructHistoryTaskAPI("GetHistoryTasks", tasks.CategoryTimer):      2,
		p.ConstructHistoryTaskAPI("GetHistoryTasks", tasks.CategoryVisibility): 2,
	}

	RequestPrioritiesOrdered = []int{0, 1, 2, 3, 4}
)
View Source
var BeanModule = fx.Options(
	BeanDepsModule,
	fx.Provide(BeanProvider),
	fx.Provide(func(impl *BeanImpl) Bean { return impl }),
	fx.Invoke(BeanLifetimeHooks),
)

Functions

func BeanLifetimeHooks added in v1.14.0

func BeanLifetimeHooks(
	lc fx.Lifecycle,
	bean Bean,
)

func ClusterMetadataManagerProvider added in v1.14.0

func ClusterMetadataManagerProvider(factory Factory) (persistence.ClusterMetadataManager, error)

func DataStoreFactoryProvider added in v1.16.0

func DataStoreFactoryProvider(
	clusterName ClusterName,
	r resolver.ServiceResolver,
	config *config.Persistence,
	abstractDataStoreFactory AbstractDataStoreFactory,
	logger log.Logger,
	metricsHandler metrics.Handler,
) (DataStoreFactory, *FaultInjectionDataStoreFactory)

func ExecutionManagerProvider added in v1.14.0

func ExecutionManagerProvider(factory Factory) (persistence.ExecutionManager, error)

func IsPersistenceTransientError added in v1.17.3

func IsPersistenceTransientError(err error) bool

func MetadataManagerProvider added in v1.14.0

func MetadataManagerProvider(factory Factory) (persistence.MetadataManager, error)

func NamespaceReplicationQueueProvider added in v1.14.0

func NamespaceReplicationQueueProvider(factory Factory) (persistence.NamespaceReplicationQueue, error)

func NewNoopPriorityRateLimiter added in v1.17.2

func NewNoopPriorityRateLimiter(
	maxQPS PersistenceMaxQps,
) quotas.RequestRateLimiter

func NewPriorityRateLimiter added in v1.17.2

func NewPriorityRateLimiter(
	namespaceMaxQPS PersistenceNamespaceMaxQps,
	hostMaxQPS PersistenceMaxQps,
	requestPriorityFn quotas.RequestPriorityFn,
) quotas.RequestRateLimiter

func RequestPriorityFn added in v1.18.0

func RequestPriorityFn(req quotas.Request) int

func ShardManagerProvider added in v1.14.0

func ShardManagerProvider(factory Factory) (persistence.ShardManager, error)

func TaskManagerProvider added in v1.14.0

func TaskManagerProvider(factory Factory) (persistence.TaskManager, error)

Types

type AbstractDataStoreFactory

type AbstractDataStoreFactory interface {
	NewFactory(
		cfg config.CustomDatastoreConfig,
		r resolver.ServiceResolver,
		clusterName string,
		logger log.Logger,
		metricsHandler metrics.Handler,
	) DataStoreFactory
}

AbstractDataStoreFactory creates a DataStoreFactory, can be used to implement custom datastore support outside of the Temporal core.

type Bean

type Bean interface {
	Close()

	GetClusterMetadataManager() persistence.ClusterMetadataManager
	GetMetadataManager() persistence.MetadataManager
	GetTaskManager() persistence.TaskManager
	GetNamespaceReplicationQueue() persistence.NamespaceReplicationQueue
	GetShardManager() persistence.ShardManager
	GetExecutionManager() persistence.ExecutionManager
}

Bean in an collection of persistence manager

type BeanImpl

type BeanImpl struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

BeanImpl stores persistence managers

func BeanProvider added in v1.14.0

func BeanProvider(
	factory Factory,
	clusterMetadataManager persistence.ClusterMetadataManager,
	metadataManager persistence.MetadataManager,
	taskManager persistence.TaskManager,
	namespaceReplicationQueue persistence.NamespaceReplicationQueue,
	shardManager persistence.ShardManager,
	executionManager persistence.ExecutionManager,
) *BeanImpl

func NewBean

func NewBean(
	factory Factory,
	clusterMetadataManager persistence.ClusterMetadataManager,
	metadataManager persistence.MetadataManager,
	taskManager persistence.TaskManager,
	namespaceReplicationQueue persistence.NamespaceReplicationQueue,
	shardManager persistence.ShardManager,
	executionManager persistence.ExecutionManager,
) *BeanImpl

NewBean create a new store bean

func NewBeanFromFactory

func NewBeanFromFactory(
	factory Factory,
) (*BeanImpl, error)

NewBeanFromFactory crate a new store bean using factory

func (*BeanImpl) Close

func (s *BeanImpl) Close()

Close cleanup connections

func (*BeanImpl) GetClusterMetadataManager

func (s *BeanImpl) GetClusterMetadataManager() persistence.ClusterMetadataManager

GetClusterMetadataManager get ClusterMetadataManager

func (*BeanImpl) GetExecutionManager

func (s *BeanImpl) GetExecutionManager() persistence.ExecutionManager

GetExecutionManager get ExecutionManager

func (*BeanImpl) GetMetadataManager

func (s *BeanImpl) GetMetadataManager() persistence.MetadataManager

GetMetadataManager get MetadataManager

func (*BeanImpl) GetNamespaceReplicationQueue

func (s *BeanImpl) GetNamespaceReplicationQueue() persistence.NamespaceReplicationQueue

GetNamespaceReplicationQueue get NamespaceReplicationQueue

func (*BeanImpl) GetShardManager

func (s *BeanImpl) GetShardManager() persistence.ShardManager

GetShardManager get ShardManager

func (*BeanImpl) GetTaskManager

func (s *BeanImpl) GetTaskManager() persistence.TaskManager

GetTaskManager get TaskManager

type ClusterName added in v1.13.0

type ClusterName string

func ClusterNameProvider added in v1.14.0

func ClusterNameProvider(config *cluster.Config) ClusterName

type DataStoreFactory

type DataStoreFactory interface {
	// Close closes the factory
	Close()
	// NewTaskStore returns a new task store
	NewTaskStore() (p.TaskStore, error)
	// NewShardStore returns a new shard store
	NewShardStore() (p.ShardStore, error)
	// NewMetadataStore returns a new metadata store
	NewMetadataStore() (p.MetadataStore, error)
	// NewExecutionStore returns a new execution store
	NewExecutionStore() (p.ExecutionStore, error)
	NewQueue(queueType p.QueueType) (p.Queue, error)
	// NewClusterMetadataStore returns a new metadata store
	NewClusterMetadataStore() (p.ClusterMetadataStore, error)
}

DataStoreFactory is a low level interface to be implemented by a datastore Examples of datastores are cassandra, mysql etc

type DefaultErrorGenerator added in v1.12.0

type DefaultErrorGenerator struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewDefaultErrorGenerator added in v1.12.0

func NewDefaultErrorGenerator(rate float64, errorWeights []FaultWeight) *DefaultErrorGenerator

func (*DefaultErrorGenerator) Generate added in v1.12.0

func (p *DefaultErrorGenerator) Generate() error

func (*DefaultErrorGenerator) Rate added in v1.13.0

func (p *DefaultErrorGenerator) Rate() float64

func (*DefaultErrorGenerator) UpdateRate added in v1.12.0

func (p *DefaultErrorGenerator) UpdateRate(rate float64)

func (*DefaultErrorGenerator) UpdateWeights added in v1.12.0

func (p *DefaultErrorGenerator) UpdateWeights(errorWeights []FaultWeight)

type EnablePriorityRateLimiting added in v1.17.3

type EnablePriorityRateLimiting dynamicconfig.BoolPropertyFn

type ErrorFactory added in v1.12.0

type ErrorFactory func(string) error

type ErrorGenerator added in v1.12.0

type ErrorGenerator interface {
	Generate() error
	UpdateRate(rate float64)
	UpdateWeights(weights []FaultWeight)
	Rate() float64
}

func NewTargetedDataStoreErrorGenerator added in v1.20.0

func NewTargetedDataStoreErrorGenerator(cfg *config.FaultInjectionDataStoreConfig) ErrorGenerator

NewTargetedDataStoreErrorGenerator returns a new instance of a data store error generator that will inject errors into the persistence layer based on the provided configuration.

type Factory

type Factory interface {
	// Close the factory
	Close()
	// NewTaskManager returns a new task manager
	NewTaskManager() (p.TaskManager, error)
	// NewShardManager returns a new shard manager
	NewShardManager() (p.ShardManager, error)
	// NewMetadataManager returns a new metadata manager
	NewMetadataManager() (p.MetadataManager, error)
	// NewExecutionManager returns a new execution manager
	NewExecutionManager() (p.ExecutionManager, error)
	// NewNamespaceReplicationQueue returns a new queue for namespace replication
	NewNamespaceReplicationQueue() (p.NamespaceReplicationQueue, error)
	// NewClusterMetadataManager returns a new manager for cluster specific metadata
	NewClusterMetadataManager() (p.ClusterMetadataManager, error)
}

Factory defines the interface for any implementation that can vend persistence layer objects backed by a datastore. The actual datastore is implementation detail hidden behind this interface

func FactoryProvider added in v1.16.0

func FactoryProvider(
	params NewFactoryParams,
) Factory

func NewFactory

func NewFactory(
	dataStoreFactory DataStoreFactory,
	cfg *config.Persistence,
	ratelimiter quotas.RequestRateLimiter,
	serializer serialization.Serializer,
	clusterName string,
	metricsHandler metrics.Handler,
	logger log.Logger,
) Factory

NewFactory returns an implementation of factory that vends persistence objects based on specified configuration. This factory takes as input a config.Persistence object which specifies the datastore to be used for a given type of object. This config also contains config for individual datastores themselves.

The objects returned by this factory enforce ratelimit and maxconns according to given configuration. In addition, all objects will emit metrics automatically

type FactoryProviderFn added in v1.16.0

type FactoryProviderFn func(NewFactoryParams) Factory

type FaultInjectionClusterMetadataStore added in v1.12.0

type FaultInjectionClusterMetadataStore struct {
	ErrorGenerator ErrorGenerator
	// contains filtered or unexported fields
}

func NewFaultInjectionClusterMetadataStore added in v1.12.0

func NewFaultInjectionClusterMetadataStore(
	rate float64,
	baseStore persistence.ClusterMetadataStore,
) (*FaultInjectionClusterMetadataStore, error)

func (*FaultInjectionClusterMetadataStore) Close added in v1.12.0

func (*FaultInjectionClusterMetadataStore) DeleteClusterMetadata added in v1.14.0

func (*FaultInjectionClusterMetadataStore) GetClusterMembers added in v1.12.0

func (*FaultInjectionClusterMetadataStore) GetClusterMetadata added in v1.12.0

func (*FaultInjectionClusterMetadataStore) GetName added in v1.12.0

func (*FaultInjectionClusterMetadataStore) ListClusterMetadata added in v1.14.0

func (*FaultInjectionClusterMetadataStore) PruneClusterMembership added in v1.12.0

func (*FaultInjectionClusterMetadataStore) SaveClusterMetadata added in v1.12.0

func (*FaultInjectionClusterMetadataStore) UpdateRate added in v1.12.0

func (c *FaultInjectionClusterMetadataStore) UpdateRate(rate float64)

func (*FaultInjectionClusterMetadataStore) UpsertClusterMembership added in v1.12.0

type FaultInjectionDataStoreFactory added in v1.12.0

type FaultInjectionDataStoreFactory struct {
	ErrorGenerator ErrorGenerator

	TaskStore      *FaultInjectionTaskStore
	ShardStore     *FaultInjectionShardStore
	MetadataStore  *FaultInjectionMetadataStore
	ExecutionStore *FaultInjectionExecutionStore
	Queue          *FaultInjectionQueue
	ClusterMDStore *FaultInjectionClusterMetadataStore
	// contains filtered or unexported fields
}

func NewFaultInjectionDatastoreFactory added in v1.12.0

func NewFaultInjectionDatastoreFactory(
	config *config.FaultInjection,
	baseFactory DataStoreFactory,
) *FaultInjectionDataStoreFactory

func (*FaultInjectionDataStoreFactory) Close added in v1.12.0

func (d *FaultInjectionDataStoreFactory) Close()

func (*FaultInjectionDataStoreFactory) NewClusterMetadataStore added in v1.12.0

func (d *FaultInjectionDataStoreFactory) NewClusterMetadataStore() (persistence.ClusterMetadataStore, error)

func (*FaultInjectionDataStoreFactory) NewExecutionStore added in v1.12.0

func (*FaultInjectionDataStoreFactory) NewMetadataStore added in v1.12.0

func (*FaultInjectionDataStoreFactory) NewQueue added in v1.12.0

func (*FaultInjectionDataStoreFactory) NewShardStore added in v1.12.0

func (*FaultInjectionDataStoreFactory) NewTaskStore added in v1.12.0

func (*FaultInjectionDataStoreFactory) UpdateRate added in v1.12.0

func (d *FaultInjectionDataStoreFactory) UpdateRate(rate float64)

type FaultInjectionExecutionStore added in v1.12.0

type FaultInjectionExecutionStore struct {
	ErrorGenerator ErrorGenerator
	// contains filtered or unexported fields
}

func NewFaultInjectionExecutionStore added in v1.12.0

func NewFaultInjectionExecutionStore(
	rate float64,
	executionStore persistence.ExecutionStore,
) (*FaultInjectionExecutionStore, error)

func (*FaultInjectionExecutionStore) AddHistoryTasks added in v1.16.0

func (*FaultInjectionExecutionStore) AppendHistoryNodes added in v1.12.0

func (*FaultInjectionExecutionStore) Close added in v1.12.0

func (e *FaultInjectionExecutionStore) Close()

func (*FaultInjectionExecutionStore) CompleteHistoryTask added in v1.16.0

func (*FaultInjectionExecutionStore) ConflictResolveWorkflowExecution added in v1.12.0

func (*FaultInjectionExecutionStore) CreateWorkflowExecution added in v1.12.0

func (*FaultInjectionExecutionStore) DeleteCurrentWorkflowExecution added in v1.12.0

func (e *FaultInjectionExecutionStore) DeleteCurrentWorkflowExecution(
	ctx context.Context,
	request *persistence.DeleteCurrentWorkflowExecutionRequest,
) error

func (*FaultInjectionExecutionStore) DeleteHistoryBranch added in v1.12.0

func (*FaultInjectionExecutionStore) DeleteHistoryNodes added in v1.12.0

func (*FaultInjectionExecutionStore) DeleteReplicationTaskFromDLQ added in v1.12.0

func (e *FaultInjectionExecutionStore) DeleteReplicationTaskFromDLQ(
	ctx context.Context,
	request *persistence.DeleteReplicationTaskFromDLQRequest,
) error

func (*FaultInjectionExecutionStore) DeleteWorkflowExecution added in v1.12.0

func (e *FaultInjectionExecutionStore) DeleteWorkflowExecution(
	ctx context.Context,
	request *persistence.DeleteWorkflowExecutionRequest,
) error

func (*FaultInjectionExecutionStore) ForkHistoryBranch added in v1.12.0

func (*FaultInjectionExecutionStore) GetAllHistoryTreeBranches added in v1.12.0

func (*FaultInjectionExecutionStore) GetCurrentExecution added in v1.12.0

func (*FaultInjectionExecutionStore) GetHistoryTask added in v1.16.0

func (*FaultInjectionExecutionStore) GetHistoryTasks added in v1.16.0

func (*FaultInjectionExecutionStore) GetHistoryTree added in v1.12.0

func (*FaultInjectionExecutionStore) GetName added in v1.12.0

func (e *FaultInjectionExecutionStore) GetName() string

func (*FaultInjectionExecutionStore) GetReplicationTasksFromDLQ added in v1.12.0

func (*FaultInjectionExecutionStore) GetWorkflowExecution added in v1.12.0

func (*FaultInjectionExecutionStore) ListConcreteExecutions added in v1.12.0

func (*FaultInjectionExecutionStore) NewHistoryBranch added in v1.17.3

func (*FaultInjectionExecutionStore) ParseHistoryBranchInfo added in v1.17.3

func (*FaultInjectionExecutionStore) PutReplicationTaskToDLQ added in v1.12.0

func (e *FaultInjectionExecutionStore) PutReplicationTaskToDLQ(
	ctx context.Context,
	request *persistence.PutReplicationTaskToDLQRequest,
) error

func (*FaultInjectionExecutionStore) RangeCompleteHistoryTasks added in v1.16.0

func (e *FaultInjectionExecutionStore) RangeCompleteHistoryTasks(
	ctx context.Context,
	request *persistence.RangeCompleteHistoryTasksRequest,
) error

func (*FaultInjectionExecutionStore) RangeDeleteReplicationTaskFromDLQ added in v1.12.0

func (e *FaultInjectionExecutionStore) RangeDeleteReplicationTaskFromDLQ(
	ctx context.Context,
	request *persistence.RangeDeleteReplicationTaskFromDLQRequest,
) error

func (*FaultInjectionExecutionStore) ReadHistoryBranch added in v1.12.0

func (*FaultInjectionExecutionStore) SetWorkflowExecution added in v1.16.0

func (*FaultInjectionExecutionStore) UpdateHistoryBranchInfo added in v1.17.3

func (*FaultInjectionExecutionStore) UpdateRate added in v1.12.0

func (e *FaultInjectionExecutionStore) UpdateRate(rate float64)

func (*FaultInjectionExecutionStore) UpdateWorkflowExecution added in v1.12.0

type FaultInjectionMetadataStore added in v1.12.0

type FaultInjectionMetadataStore struct {
	ErrorGenerator ErrorGenerator
	// contains filtered or unexported fields
}

func NewFaultInjectionMetadataStore added in v1.12.0

func NewFaultInjectionMetadataStore(
	rate float64,
	metadataStore persistence.MetadataStore,
) (*FaultInjectionMetadataStore, error)

func (*FaultInjectionMetadataStore) Close added in v1.12.0

func (m *FaultInjectionMetadataStore) Close()

func (*FaultInjectionMetadataStore) CreateNamespace added in v1.12.0

func (*FaultInjectionMetadataStore) DeleteNamespace added in v1.12.0

func (*FaultInjectionMetadataStore) DeleteNamespaceByName added in v1.12.0

func (m *FaultInjectionMetadataStore) DeleteNamespaceByName(
	ctx context.Context,
	request *persistence.DeleteNamespaceByNameRequest,
) error

func (*FaultInjectionMetadataStore) GetMetadata added in v1.12.0

func (*FaultInjectionMetadataStore) GetName added in v1.12.0

func (m *FaultInjectionMetadataStore) GetName() string

func (*FaultInjectionMetadataStore) GetNamespace added in v1.12.0

func (*FaultInjectionMetadataStore) ListNamespaces added in v1.12.0

func (*FaultInjectionMetadataStore) RenameNamespace added in v1.16.0

func (*FaultInjectionMetadataStore) UpdateNamespace added in v1.12.0

func (*FaultInjectionMetadataStore) UpdateRate added in v1.12.0

func (m *FaultInjectionMetadataStore) UpdateRate(rate float64)

type FaultInjectionQueue added in v1.12.0

type FaultInjectionQueue struct {
	ErrorGenerator ErrorGenerator
	// contains filtered or unexported fields
}

func NewFaultInjectionQueue added in v1.12.0

func NewFaultInjectionQueue(rate float64, baseQueue persistence.Queue) (*FaultInjectionQueue, error)

func (*FaultInjectionQueue) Close added in v1.12.0

func (q *FaultInjectionQueue) Close()

func (*FaultInjectionQueue) DeleteMessageFromDLQ added in v1.12.0

func (q *FaultInjectionQueue) DeleteMessageFromDLQ(
	ctx context.Context,
	messageID int64,
) error

func (*FaultInjectionQueue) DeleteMessagesBefore added in v1.12.0

func (q *FaultInjectionQueue) DeleteMessagesBefore(
	ctx context.Context,
	messageID int64,
) error

func (*FaultInjectionQueue) EnqueueMessage added in v1.12.0

func (q *FaultInjectionQueue) EnqueueMessage(
	ctx context.Context,
	blob commonpb.DataBlob,
) error

func (*FaultInjectionQueue) EnqueueMessageToDLQ added in v1.12.0

func (q *FaultInjectionQueue) EnqueueMessageToDLQ(
	ctx context.Context,
	blob commonpb.DataBlob,
) (int64, error)

func (*FaultInjectionQueue) GetAckLevels added in v1.12.0

func (*FaultInjectionQueue) GetDLQAckLevels added in v1.12.0

func (*FaultInjectionQueue) Init added in v1.12.0

func (q *FaultInjectionQueue) Init(
	ctx context.Context,
	blob *commonpb.DataBlob,
) error

func (*FaultInjectionQueue) RangeDeleteMessagesFromDLQ added in v1.12.0

func (q *FaultInjectionQueue) RangeDeleteMessagesFromDLQ(
	ctx context.Context,
	firstMessageID int64,
	lastMessageID int64,
) error

func (*FaultInjectionQueue) ReadMessages added in v1.12.0

func (q *FaultInjectionQueue) ReadMessages(
	ctx context.Context,
	lastMessageID int64,
	maxCount int,
) ([]*persistence.QueueMessage, error)

func (*FaultInjectionQueue) ReadMessagesFromDLQ added in v1.12.0

func (q *FaultInjectionQueue) ReadMessagesFromDLQ(
	ctx context.Context,
	firstMessageID int64,
	lastMessageID int64,
	pageSize int,
	pageToken []byte,
) ([]*persistence.QueueMessage, []byte, error)

func (*FaultInjectionQueue) UpdateAckLevel added in v1.12.0

func (q *FaultInjectionQueue) UpdateAckLevel(
	ctx context.Context,
	metadata *persistence.InternalQueueMetadata,
) error

func (*FaultInjectionQueue) UpdateDLQAckLevel added in v1.12.0

func (q *FaultInjectionQueue) UpdateDLQAckLevel(
	ctx context.Context,
	metadata *persistence.InternalQueueMetadata,
) error

func (*FaultInjectionQueue) UpdateRate added in v1.12.0

func (q *FaultInjectionQueue) UpdateRate(rate float64)

type FaultInjectionShardStore added in v1.12.0

type FaultInjectionShardStore struct {
	ErrorGenerator ErrorGenerator
	// contains filtered or unexported fields
}

func NewFaultInjectionShardStore added in v1.12.0

func NewFaultInjectionShardStore(
	rate float64,
	baseShardStore persistence.ShardStore,
) (*FaultInjectionShardStore, error)

func (*FaultInjectionShardStore) AssertShardOwnership added in v1.17.0

func (s *FaultInjectionShardStore) AssertShardOwnership(
	ctx context.Context,
	request *persistence.AssertShardOwnershipRequest,
) error

func (*FaultInjectionShardStore) Close added in v1.12.0

func (s *FaultInjectionShardStore) Close()

func (*FaultInjectionShardStore) GetClusterName added in v1.12.0

func (s *FaultInjectionShardStore) GetClusterName() string

func (*FaultInjectionShardStore) GetName added in v1.12.0

func (s *FaultInjectionShardStore) GetName() string

func (*FaultInjectionShardStore) GetOrCreateShard added in v1.14.0

func (*FaultInjectionShardStore) UpdateRate added in v1.12.0

func (s *FaultInjectionShardStore) UpdateRate(rate float64)

func (*FaultInjectionShardStore) UpdateShard added in v1.12.0

type FaultInjectionTaskStore added in v1.12.0

type FaultInjectionTaskStore struct {
	ErrorGenerator ErrorGenerator
	// contains filtered or unexported fields
}

func NewFaultInjectionTaskStore added in v1.12.0

func NewFaultInjectionTaskStore(
	rate float64,
	baseTaskStore persistence.TaskStore,
) (*FaultInjectionTaskStore, error)

func (*FaultInjectionTaskStore) Close added in v1.12.0

func (t *FaultInjectionTaskStore) Close()

func (*FaultInjectionTaskStore) CompleteTask added in v1.12.0

func (t *FaultInjectionTaskStore) CompleteTask(
	ctx context.Context,
	request *persistence.CompleteTaskRequest,
) error

func (*FaultInjectionTaskStore) CompleteTasksLessThan added in v1.12.0

func (t *FaultInjectionTaskStore) CompleteTasksLessThan(
	ctx context.Context,
	request *persistence.CompleteTasksLessThanRequest,
) (int, error)

func (*FaultInjectionTaskStore) CreateTaskQueue added in v1.12.0

func (*FaultInjectionTaskStore) CreateTasks added in v1.12.0

func (*FaultInjectionTaskStore) DeleteTaskQueue added in v1.12.0

func (t *FaultInjectionTaskStore) DeleteTaskQueue(
	ctx context.Context,
	request *persistence.DeleteTaskQueueRequest,
) error

func (*FaultInjectionTaskStore) GetName added in v1.12.0

func (t *FaultInjectionTaskStore) GetName() string

func (*FaultInjectionTaskStore) GetTaskQueue added in v1.12.0

func (*FaultInjectionTaskStore) GetTasks added in v1.12.0

func (*FaultInjectionTaskStore) ListTaskQueue added in v1.12.0

func (*FaultInjectionTaskStore) UpdateRate added in v1.12.0

func (t *FaultInjectionTaskStore) UpdateRate(rate float64)

func (*FaultInjectionTaskStore) UpdateTaskQueue added in v1.12.0

type FaultMetadata added in v1.12.0

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

type FaultWeight added in v1.12.0

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

type MockBean

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

MockBean is a mock of Bean interface.

func NewMockBean

func NewMockBean(ctrl *gomock.Controller) *MockBean

NewMockBean creates a new mock instance.

func (*MockBean) Close

func (m *MockBean) Close()

Close mocks base method.

func (*MockBean) EXPECT

func (m *MockBean) EXPECT() *MockBeanMockRecorder

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

func (*MockBean) GetClusterMetadataManager

func (m *MockBean) GetClusterMetadataManager() persistence.ClusterMetadataManager

GetClusterMetadataManager mocks base method.

func (*MockBean) GetExecutionManager

func (m *MockBean) GetExecutionManager() persistence.ExecutionManager

GetExecutionManager mocks base method.

func (*MockBean) GetMetadataManager

func (m *MockBean) GetMetadataManager() persistence.MetadataManager

GetMetadataManager mocks base method.

func (*MockBean) GetNamespaceReplicationQueue

func (m *MockBean) GetNamespaceReplicationQueue() persistence.NamespaceReplicationQueue

GetNamespaceReplicationQueue mocks base method.

func (*MockBean) GetShardManager

func (m *MockBean) GetShardManager() persistence.ShardManager

GetShardManager mocks base method.

func (*MockBean) GetTaskManager

func (m *MockBean) GetTaskManager() persistence.TaskManager

GetTaskManager mocks base method.

type MockBeanMockRecorder

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

MockBeanMockRecorder is the mock recorder for MockBean.

func (*MockBeanMockRecorder) Close

func (mr *MockBeanMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockBeanMockRecorder) GetClusterMetadataManager

func (mr *MockBeanMockRecorder) GetClusterMetadataManager() *gomock.Call

GetClusterMetadataManager indicates an expected call of GetClusterMetadataManager.

func (*MockBeanMockRecorder) GetExecutionManager

func (mr *MockBeanMockRecorder) GetExecutionManager() *gomock.Call

GetExecutionManager indicates an expected call of GetExecutionManager.

func (*MockBeanMockRecorder) GetMetadataManager

func (mr *MockBeanMockRecorder) GetMetadataManager() *gomock.Call

GetMetadataManager indicates an expected call of GetMetadataManager.

func (*MockBeanMockRecorder) GetNamespaceReplicationQueue

func (mr *MockBeanMockRecorder) GetNamespaceReplicationQueue() *gomock.Call

GetNamespaceReplicationQueue indicates an expected call of GetNamespaceReplicationQueue.

func (*MockBeanMockRecorder) GetShardManager

func (mr *MockBeanMockRecorder) GetShardManager() *gomock.Call

GetShardManager indicates an expected call of GetShardManager.

func (*MockBeanMockRecorder) GetTaskManager

func (mr *MockBeanMockRecorder) GetTaskManager() *gomock.Call

GetTaskManager indicates an expected call of GetTaskManager.

type NewFactoryParams added in v1.16.0

type NewFactoryParams struct {
	fx.In

	DataStoreFactory           DataStoreFactory
	Cfg                        *config.Persistence
	PersistenceMaxQPS          PersistenceMaxQps
	PersistenceNamespaceMaxQPS PersistenceNamespaceMaxQps
	EnablePriorityRateLimiting EnablePriorityRateLimiting
	ClusterName                ClusterName
	MetricsHandler             metrics.Handler
	Logger                     log.Logger
}

type NoopErrorGenerator added in v1.12.0

type NoopErrorGenerator struct{}

func NewNoopErrorGenerator added in v1.12.0

func NewNoopErrorGenerator() *NoopErrorGenerator

func (*NoopErrorGenerator) Generate added in v1.12.0

func (p *NoopErrorGenerator) Generate() error

func (*NoopErrorGenerator) Rate added in v1.13.0

func (p *NoopErrorGenerator) Rate() float64

func (*NoopErrorGenerator) UpdateRate added in v1.12.0

func (p *NoopErrorGenerator) UpdateRate(rate float64)

func (*NoopErrorGenerator) UpdateWeights added in v1.12.0

func (p *NoopErrorGenerator) UpdateWeights(weights []FaultWeight)

type PersistenceMaxQps added in v1.13.0

type PersistenceMaxQps dynamicconfig.IntPropertyFn

type PersistenceNamespaceMaxQps added in v1.17.3

type PersistenceNamespaceMaxQps dynamicconfig.IntPropertyFnWithNamespaceFilter

Jump to

Keyboard shortcuts

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