client

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: MIT Imports: 11 Imported by: 3

Documentation

Overview

Package client is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractDataStoreFactory

type AbstractDataStoreFactory interface {
	NewFactory(cfg config.CustomDatastoreConfig, clusterName string, logger log.Logger) 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
	SetClusterMetadataManager(persistence.ClusterMetadataManager)

	GetMetadataManager() persistence.MetadataManager
	SetMetadataManager(persistence.MetadataManager)

	GetTaskManager() persistence.TaskManager
	SetTaskManager(persistence.TaskManager)

	GetVisibilityManager() persistence.VisibilityManager
	SetVisibilityManager(persistence.VisibilityManager)

	GetNamespaceReplicationQueue() persistence.NamespaceReplicationQueue
	SetNamespaceReplicationQueue(persistence.NamespaceReplicationQueue)

	GetShardManager() persistence.ShardManager
	SetShardManager(persistence.ShardManager)

	GetHistoryManager() persistence.HistoryManager
	SetHistoryManager(persistence.HistoryManager)

	GetExecutionManager(int32) (persistence.ExecutionManager, error)
	SetExecutionManager(int32, 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 NewBean

func NewBean(
	clusterMetadataManager persistence.ClusterMetadataManager,
	metadataManager persistence.MetadataManager,
	taskManager persistence.TaskManager,
	visibilityManager persistence.VisibilityManager,
	namespaceReplicationQueue persistence.NamespaceReplicationQueue,
	shardManager persistence.ShardManager,
	historyManager persistence.HistoryManager,
	executionManagerFactory persistence.ExecutionManagerFactory,
) *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(
	shardID int32,
) (persistence.ExecutionManager, error)

GetExecutionManager get ExecutionManager

func (*BeanImpl) GetHistoryManager

func (s *BeanImpl) GetHistoryManager() persistence.HistoryManager

GetHistoryManager get HistoryManager

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

func (*BeanImpl) GetVisibilityManager

func (s *BeanImpl) GetVisibilityManager() persistence.VisibilityManager

GetVisibilityManager get VisibilityManager

func (*BeanImpl) SetClusterMetadataManager

func (s *BeanImpl) SetClusterMetadataManager(
	clusterMetadataManager persistence.ClusterMetadataManager,
)

SetClusterMetadataManager set ClusterMetadataManager

func (*BeanImpl) SetExecutionManager

func (s *BeanImpl) SetExecutionManager(
	shardID int32,
	executionManager persistence.ExecutionManager,
)

SetExecutionManager set ExecutionManager

func (*BeanImpl) SetHistoryManager

func (s *BeanImpl) SetHistoryManager(
	historyManager persistence.HistoryManager,
)

SetHistoryManager set HistoryManager

func (*BeanImpl) SetMetadataManager

func (s *BeanImpl) SetMetadataManager(
	metadataManager persistence.MetadataManager,
)

SetMetadataManager set MetadataManager

func (*BeanImpl) SetNamespaceReplicationQueue

func (s *BeanImpl) SetNamespaceReplicationQueue(
	namespaceReplicationQueue persistence.NamespaceReplicationQueue,
)

SetNamespaceReplicationQueue set NamespaceReplicationQueue

func (*BeanImpl) SetShardManager

func (s *BeanImpl) SetShardManager(
	shardManager persistence.ShardManager,
)

SetShardManager set ShardManager

func (*BeanImpl) SetTaskManager

func (s *BeanImpl) SetTaskManager(
	taskManager persistence.TaskManager,
)

SetTaskManager set TaskManager

func (*BeanImpl) SetVisibilityManager

func (s *BeanImpl) SetVisibilityManager(
	visibilityManager persistence.VisibilityManager,
)

SetVisibilityManager set VisibilityManager

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)
	// NewHistoryV2Store returns a new historyV2 store
	NewHistoryV2Store() (p.HistoryStore, error)
	// NewMetadataStore returns a new metadata store
	NewMetadataStore() (p.MetadataStore, error)
	// NewExecutionStore returns an execution store for given shardID
	NewExecutionStore(shardID int32) (p.ExecutionStore, error)
	// NewVisibilityStore returns a new visibility store
	NewVisibilityStore() (p.VisibilityStore, 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 Datastore

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

Datastore represents a datastore

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)
	// NewHistoryManager returns a new history manager
	NewHistoryManager() (p.HistoryManager, error)
	// NewMetadataManager returns a new metadata manager
	NewMetadataManager() (p.MetadataManager, error)
	// NewExecutionManager returns a new execution manager for a given shardID
	NewExecutionManager(shardID int32) (p.ExecutionManager, error)
	// NewVisibilityManager returns a new visibility manager
	NewVisibilityManager() (p.VisibilityManager, error)
	// NewNamespaceReplicationQueue returns a new queue for namespace replication
	NewNamespaceReplicationQueue() (p.NamespaceReplicationQueue, error)
	// NewClusterMetadata 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 NewFactory

func NewFactory(
	cfg *config.Persistence,
	persistenceMaxQPS dynamicconfig.IntPropertyFn,
	abstractDataStoreFactory AbstractDataStoreFactory,
	clusterName string,
	metricsClient metrics.Client,
	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 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(arg0 int32) (persistence.ExecutionManager, error)

GetExecutionManager mocks base method.

func (*MockBean) GetHistoryManager

func (m *MockBean) GetHistoryManager() persistence.HistoryManager

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

func (*MockBean) GetVisibilityManager

func (m *MockBean) GetVisibilityManager() persistence.VisibilityManager

GetVisibilityManager mocks base method.

func (*MockBean) SetClusterMetadataManager

func (m *MockBean) SetClusterMetadataManager(arg0 persistence.ClusterMetadataManager)

SetClusterMetadataManager mocks base method.

func (*MockBean) SetExecutionManager

func (m *MockBean) SetExecutionManager(arg0 int32, arg1 persistence.ExecutionManager)

SetExecutionManager mocks base method.

func (*MockBean) SetHistoryManager

func (m *MockBean) SetHistoryManager(arg0 persistence.HistoryManager)

SetHistoryManager mocks base method.

func (*MockBean) SetMetadataManager

func (m *MockBean) SetMetadataManager(arg0 persistence.MetadataManager)

SetMetadataManager mocks base method.

func (*MockBean) SetNamespaceReplicationQueue

func (m *MockBean) SetNamespaceReplicationQueue(arg0 persistence.NamespaceReplicationQueue)

SetNamespaceReplicationQueue mocks base method.

func (*MockBean) SetShardManager

func (m *MockBean) SetShardManager(arg0 persistence.ShardManager)

SetShardManager mocks base method.

func (*MockBean) SetTaskManager

func (m *MockBean) SetTaskManager(arg0 persistence.TaskManager)

SetTaskManager mocks base method.

func (*MockBean) SetVisibilityManager

func (m *MockBean) SetVisibilityManager(arg0 persistence.VisibilityManager)

SetVisibilityManager 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(arg0 interface{}) *gomock.Call

GetExecutionManager indicates an expected call of GetExecutionManager.

func (*MockBeanMockRecorder) GetHistoryManager

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

GetHistoryManager indicates an expected call of GetHistoryManager.

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.

func (*MockBeanMockRecorder) GetVisibilityManager

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

GetVisibilityManager indicates an expected call of GetVisibilityManager.

func (*MockBeanMockRecorder) SetClusterMetadataManager

func (mr *MockBeanMockRecorder) SetClusterMetadataManager(arg0 interface{}) *gomock.Call

SetClusterMetadataManager indicates an expected call of SetClusterMetadataManager.

func (*MockBeanMockRecorder) SetExecutionManager

func (mr *MockBeanMockRecorder) SetExecutionManager(arg0, arg1 interface{}) *gomock.Call

SetExecutionManager indicates an expected call of SetExecutionManager.

func (*MockBeanMockRecorder) SetHistoryManager

func (mr *MockBeanMockRecorder) SetHistoryManager(arg0 interface{}) *gomock.Call

SetHistoryManager indicates an expected call of SetHistoryManager.

func (*MockBeanMockRecorder) SetMetadataManager

func (mr *MockBeanMockRecorder) SetMetadataManager(arg0 interface{}) *gomock.Call

SetMetadataManager indicates an expected call of SetMetadataManager.

func (*MockBeanMockRecorder) SetNamespaceReplicationQueue

func (mr *MockBeanMockRecorder) SetNamespaceReplicationQueue(arg0 interface{}) *gomock.Call

SetNamespaceReplicationQueue indicates an expected call of SetNamespaceReplicationQueue.

func (*MockBeanMockRecorder) SetShardManager

func (mr *MockBeanMockRecorder) SetShardManager(arg0 interface{}) *gomock.Call

SetShardManager indicates an expected call of SetShardManager.

func (*MockBeanMockRecorder) SetTaskManager

func (mr *MockBeanMockRecorder) SetTaskManager(arg0 interface{}) *gomock.Call

SetTaskManager indicates an expected call of SetTaskManager.

func (*MockBeanMockRecorder) SetVisibilityManager

func (mr *MockBeanMockRecorder) SetVisibilityManager(arg0 interface{}) *gomock.Call

SetVisibilityManager indicates an expected call of SetVisibilityManager.

Jump to

Keyboard shortcuts

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