Documentation ¶
Index ¶
- type BootstrapParams
- type Impl
- func (h *Impl) GetArchivalMetadata() archiver.ArchivalMetadata
- func (h *Impl) GetArchiverProvider() provider.ArchiverProvider
- func (h *Impl) GetClientBean() client.Bean
- func (h *Impl) GetClusterMetadata() cluster.Metadata
- func (h *Impl) GetClusterMetadataManager() persistence.ClusterMetadataManager
- func (h *Impl) GetExecutionManager(shardID int32) (persistence.ExecutionManager, error)
- func (h *Impl) GetFrontendClient() frontend.Client
- func (h *Impl) GetFrontendRawClient() frontend.Client
- func (h *Impl) GetFrontendServiceResolver() membership.ServiceResolver
- func (h *Impl) GetGRPCListener() net.Listener
- func (h *Impl) GetHistoryClient() history.Client
- func (h *Impl) GetHistoryManager() persistence.HistoryManager
- func (h *Impl) GetHistoryRawClient() history.Client
- func (h *Impl) GetHistoryServiceResolver() membership.ServiceResolver
- func (h *Impl) GetHostInfo() *membership.HostInfo
- func (h *Impl) GetHostName() string
- func (h *Impl) GetLogger() log.Logger
- func (h *Impl) GetMatchingClient() matching.Client
- func (h *Impl) GetMatchingRawClient() matching.Client
- func (h *Impl) GetMatchingServiceResolver() membership.ServiceResolver
- func (h *Impl) GetMembershipMonitor() membership.Monitor
- func (h *Impl) GetMessagingClient() messaging.Client
- func (h *Impl) GetMetadataManager() persistence.MetadataManager
- func (h *Impl) GetMetricsClient() metrics.Client
- func (h *Impl) GetNamespaceCache() cache.NamespaceCache
- func (h *Impl) GetNamespaceReplicationQueue() persistence.NamespaceReplicationQueue
- func (h *Impl) GetPayloadSerializer() persistence.PayloadSerializer
- func (h *Impl) GetPersistenceBean() persistenceClient.Bean
- func (h *Impl) GetRemoteAdminClient(cluster string) admin.Client
- func (h *Impl) GetRemoteFrontendClient(cluster string) frontend.Client
- func (h *Impl) GetSDKClient() sdkclient.Client
- func (h *Impl) GetServiceName() string
- func (h *Impl) GetShardManager() persistence.ShardManager
- func (h *Impl) GetTaskManager() persistence.TaskManager
- func (h *Impl) GetThrottledLogger() log.Logger
- func (h *Impl) GetTimeSource() clock.TimeSource
- func (h *Impl) GetVisibilityManager() persistence.VisibilityManager
- func (h *Impl) GetWorkerServiceResolver() membership.ServiceResolver
- func (h *Impl) Start()
- func (h *Impl) Stop()
- type MembershipFactoryInitializerFunc
- type MembershipMonitorFactory
- type Resource
- type Test
- func (s *Test) Finish(t mock.TestingT)
- func (s *Test) GetArchivalMetadata() archiver.ArchivalMetadata
- func (s *Test) GetArchiverProvider() provider.ArchiverProvider
- func (s *Test) GetClientBean() client.Bean
- func (s *Test) GetClusterMetadata() cluster.Metadata
- func (s *Test) GetClusterMetadataManager() persistence.ClusterMetadataManager
- func (s *Test) GetExecutionManager(shardID int32) (persistence.ExecutionManager, error)
- func (s *Test) GetFrontendClient() frontend.Client
- func (s *Test) GetFrontendRawClient() frontend.Client
- func (s *Test) GetFrontendServiceResolver() membership.ServiceResolver
- func (s *Test) GetGRPCListener() net.Listener
- func (s *Test) GetHistoryClient() history.Client
- func (s *Test) GetHistoryManager() persistence.HistoryManager
- func (s *Test) GetHistoryRawClient() history.Client
- func (s *Test) GetHistoryServiceResolver() membership.ServiceResolver
- func (s *Test) GetHostInfo() *membership.HostInfo
- func (s *Test) GetHostName() string
- func (s *Test) GetLogger() log.Logger
- func (s *Test) GetMatchingClient() matching.Client
- func (s *Test) GetMatchingRawClient() matching.Client
- func (s *Test) GetMatchingServiceResolver() membership.ServiceResolver
- func (s *Test) GetMembershipMonitor() membership.Monitor
- func (s *Test) GetMessagingClient() messaging.Client
- func (s *Test) GetMetadataManager() persistence.MetadataManager
- func (s *Test) GetMetricsClient() metrics.Client
- func (s *Test) GetNamespaceCache() cache.NamespaceCache
- func (s *Test) GetNamespaceReplicationQueue() persistence.NamespaceReplicationQueue
- func (s *Test) GetPayloadSerializer() persistence.PayloadSerializer
- func (s *Test) GetPersistenceBean() persistenceClient.Bean
- func (s *Test) GetRemoteAdminClient(cluster string) admin.Client
- func (s *Test) GetRemoteFrontendClient(cluster string) frontend.Client
- func (s *Test) GetSDKClient() sdkclient.Client
- func (s *Test) GetServiceName() string
- func (s *Test) GetShardManager() persistence.ShardManager
- func (s *Test) GetTaskManager() persistence.TaskManager
- func (s *Test) GetThrottledLogger() log.Logger
- func (s *Test) GetTimeSource() clock.TimeSource
- func (s *Test) GetVisibilityManager() persistence.VisibilityManager
- func (s *Test) GetWorkerServiceResolver() membership.ServiceResolver
- func (s *Test) Start()
- func (s *Test) Stop()
- type VisibilityManagerInitializer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BootstrapParams ¶
type BootstrapParams struct { Name string InstanceID string Logger log.Logger ThrottledLogger log.Logger MetricsScope tally.Scope MembershipFactoryInitializer MembershipFactoryInitializerFunc RPCFactory common.RPCFactory AbstractDatastoreFactory persistenceClient.AbstractDataStoreFactory PersistenceConfig config.Persistence ClusterMetadata cluster.Metadata ReplicatorConfig config.Replicator MetricsClient metrics.Client MessagingClient messaging.Client ESClient elasticsearch.Client ESConfig *elasticsearch.Config DynamicConfig dynamicconfig.Client DCRedirectionPolicy config.DCRedirectionPolicy PublicClient sdkclient.Client ArchivalMetadata archiver.ArchivalMetadata ArchiverProvider provider.ArchiverProvider Authorizer authorization.Authorizer }
BootstrapParams holds the set of parameters needed to bootstrap a service
type Impl ¶
type Impl struct {
// contains filtered or unexported fields
}
Impl contains all common resources shared across frontend / matching / history / worker
func New ¶
func New( params *BootstrapParams, serviceName string, persistenceMaxQPS dynamicconfig.IntPropertyFn, persistenceGlobalMaxQPS dynamicconfig.IntPropertyFn, throttledLoggerMaxRPS dynamicconfig.IntPropertyFn, visibilityManagerInitializer VisibilityManagerInitializer, ) (impl *Impl, retError error)
New create a new resource containing common dependencies
func (*Impl) GetArchivalMetadata ¶
func (h *Impl) GetArchivalMetadata() archiver.ArchivalMetadata
GetArchivalMetadata return archival metadata
func (*Impl) GetArchiverProvider ¶
func (h *Impl) GetArchiverProvider() provider.ArchiverProvider
GetArchiverProvider return archival provider
func (*Impl) GetClientBean ¶
GetClientBean return RPC client bean
func (*Impl) GetClusterMetadata ¶
GetClusterMetadata return cluster metadata
func (*Impl) GetClusterMetadataManager ¶
func (h *Impl) GetClusterMetadataManager() persistence.ClusterMetadataManager
GetClusterMetadataManager return metadata manager
func (*Impl) GetExecutionManager ¶
func (h *Impl) GetExecutionManager( shardID int32, ) (persistence.ExecutionManager, error)
GetExecutionManager return execution manager for given shard ID
func (*Impl) GetFrontendClient ¶
GetFrontendClient return frontend client with retry policy
func (*Impl) GetFrontendRawClient ¶
GetFrontendRawClient return frontend client without retry policy
func (*Impl) GetFrontendServiceResolver ¶
func (h *Impl) GetFrontendServiceResolver() membership.ServiceResolver
GetFrontendServiceResolver return frontend service resolver
func (*Impl) GetGRPCListener ¶
GetGRPCListener return GRPC listener, used for registering handlers
func (*Impl) GetHistoryClient ¶
GetHistoryClient return history client with retry policy
func (*Impl) GetHistoryManager ¶
func (h *Impl) GetHistoryManager() persistence.HistoryManager
GetHistoryManager return history manager
func (*Impl) GetHistoryRawClient ¶
GetHistoryRawClient return history client without retry policy
func (*Impl) GetHistoryServiceResolver ¶
func (h *Impl) GetHistoryServiceResolver() membership.ServiceResolver
GetHistoryServiceResolver return history service resolver
func (*Impl) GetHostInfo ¶
func (h *Impl) GetHostInfo() *membership.HostInfo
GetHostInfo return host info
func (*Impl) GetMatchingClient ¶
GetMatchingClient return matching client with retry policy
func (*Impl) GetMatchingRawClient ¶
GetMatchingRawClient return matching client without retry policy
func (*Impl) GetMatchingServiceResolver ¶
func (h *Impl) GetMatchingServiceResolver() membership.ServiceResolver
GetMatchingServiceResolver return matching service resolver
func (*Impl) GetMembershipMonitor ¶
func (h *Impl) GetMembershipMonitor() membership.Monitor
GetMembershipMonitor return the membership monitor
func (*Impl) GetMessagingClient ¶
GetMessagingClient return messaging client
func (*Impl) GetMetadataManager ¶
func (h *Impl) GetMetadataManager() persistence.MetadataManager
GetMetadataManager return metadata manager
func (*Impl) GetMetricsClient ¶
GetMetricsClient return metrics client
func (*Impl) GetNamespaceCache ¶
func (h *Impl) GetNamespaceCache() cache.NamespaceCache
GetNamespaceCache return namespace cache
func (*Impl) GetNamespaceReplicationQueue ¶
func (h *Impl) GetNamespaceReplicationQueue() persistence.NamespaceReplicationQueue
GetNamespaceReplicationQueue return namespace replication queue
func (*Impl) GetPayloadSerializer ¶
func (h *Impl) GetPayloadSerializer() persistence.PayloadSerializer
GetPayloadSerializer return binary payload serializer
func (*Impl) GetPersistenceBean ¶
func (h *Impl) GetPersistenceBean() persistenceClient.Bean
GetPersistenceBean return persistence bean
func (*Impl) GetRemoteAdminClient ¶
GetRemoteAdminClient return remote admin client for given cluster name
func (*Impl) GetRemoteFrontendClient ¶
GetRemoteFrontendClient return remote frontend client for given cluster name
func (*Impl) GetSDKClient ¶
GetSDKClient return sdk client
func (*Impl) GetServiceName ¶
GetServiceName return service name
func (*Impl) GetShardManager ¶
func (h *Impl) GetShardManager() persistence.ShardManager
GetShardManager return shard manager
func (*Impl) GetTaskManager ¶
func (h *Impl) GetTaskManager() persistence.TaskManager
GetTaskManager return task manager
func (*Impl) GetThrottledLogger ¶
GetThrottledLogger return throttled logger
func (*Impl) GetTimeSource ¶
func (h *Impl) GetTimeSource() clock.TimeSource
GetTimeSource return time source
func (*Impl) GetVisibilityManager ¶
func (h *Impl) GetVisibilityManager() persistence.VisibilityManager
GetVisibilityManager return visibility manager
func (*Impl) GetWorkerServiceResolver ¶
func (h *Impl) GetWorkerServiceResolver() membership.ServiceResolver
GetWorkerServiceResolver return worker service resolver
type MembershipFactoryInitializerFunc ¶
type MembershipFactoryInitializerFunc func(persistenceBean persistenceClient.Bean, logger log.Logger) (MembershipMonitorFactory, error)
MembershipFactoryInitializerFunc is used for deferred initialization of the MembershipFactory to allow for the PersistenceBean to be constructed further downstream.
type MembershipMonitorFactory ¶
type MembershipMonitorFactory interface { // GetMembershipMonitor return a membership monitor GetMembershipMonitor() (membership.Monitor, error) }
MembershipMonitorFactory provides a bootstrapped membership monitor
type Resource ¶
type Resource interface { common.Daemon GetServiceName() string GetHostName() string GetHostInfo() *membership.HostInfo GetArchivalMetadata() archiver.ArchivalMetadata GetClusterMetadata() cluster.Metadata GetNamespaceCache() cache.NamespaceCache GetTimeSource() clock.TimeSource GetPayloadSerializer() persistence.PayloadSerializer GetMetricsClient() metrics.Client GetArchiverProvider() provider.ArchiverProvider GetMessagingClient() messaging.Client GetMembershipMonitor() membership.Monitor GetFrontendServiceResolver() membership.ServiceResolver GetMatchingServiceResolver() membership.ServiceResolver GetHistoryServiceResolver() membership.ServiceResolver GetWorkerServiceResolver() membership.ServiceResolver GetSDKClient() sdkclient.Client GetFrontendRawClient() frontend.Client GetFrontendClient() frontend.Client GetMatchingRawClient() matching.Client GetMatchingClient() matching.Client GetHistoryRawClient() history.Client GetHistoryClient() history.Client GetRemoteAdminClient(cluster string) admin.Client GetRemoteFrontendClient(cluster string) frontend.Client GetClientBean() client.Bean GetMetadataManager() persistence.MetadataManager GetClusterMetadataManager() persistence.ClusterMetadataManager GetTaskManager() persistence.TaskManager GetVisibilityManager() persistence.VisibilityManager GetNamespaceReplicationQueue() persistence.NamespaceReplicationQueue GetShardManager() persistence.ShardManager GetHistoryManager() persistence.HistoryManager GetExecutionManager(int32) (persistence.ExecutionManager, error) GetPersistenceBean() persistenceClient.Bean GetLogger() log.Logger GetThrottledLogger() log.Logger // for registering handlers GetGRPCListener() net.Listener }
Resource is the interface which expose common resources
type Test ¶
type Test struct { MetricsScope tally.Scope ClusterMetadata *cluster.MockMetadata NamespaceCache *cache.MockNamespaceCache TimeSource clock.TimeSource PayloadSerializer persistence.PayloadSerializer MetricsClient metrics.Client ArchivalMetadata *archiver.MockArchivalMetadata ArchiverProvider *provider.MockArchiverProvider MembershipMonitor *membership.MockMonitor FrontendServiceResolver *membership.MockServiceResolver MatchingServiceResolver *membership.MockServiceResolver HistoryServiceResolver *membership.MockServiceResolver WorkerServiceResolver *membership.MockServiceResolver SDKClient sdkclient.Client FrontendClient *workflowservicemock.MockWorkflowServiceClient MatchingClient *matchingservicemock.MockMatchingServiceClient HistoryClient *historyservicemock.MockHistoryServiceClient RemoteAdminClient *adminservicemock.MockAdminServiceClient RemoteFrontendClient *workflowservicemock.MockWorkflowServiceClient ClientBean *client.MockBean MetadataMgr *mocks.MetadataManager ClusterMetadataMgr *mocks.MockClusterMetadataManager TaskMgr *mocks.TaskManager VisibilityMgr *mocks.VisibilityManager NamespaceReplicationQueue persistence.NamespaceReplicationQueue ShardMgr *mocks.ShardManager HistoryMgr *mocks.HistoryV2Manager ExecutionMgr *mocks.ExecutionManager PersistenceBean *persistenceClient.MockBean Logger log.Logger }
Test is the test implementation used for testing
func NewTest ¶
func NewTest( controller *gomock.Controller, serviceMetricsIndex metrics.ServiceIdx, ) *Test
NewTest returns a new test resource instance
func (*Test) GetArchivalMetadata ¶
func (s *Test) GetArchivalMetadata() archiver.ArchivalMetadata
GetArchivalMetadata for testing
func (*Test) GetArchiverProvider ¶
func (s *Test) GetArchiverProvider() provider.ArchiverProvider
GetArchiverProvider for testing
func (*Test) GetClusterMetadata ¶
GetClusterMetadata for testing
func (*Test) GetClusterMetadataManager ¶ added in v1.1.0
func (s *Test) GetClusterMetadataManager() persistence.ClusterMetadataManager
GetClusterMetadata for testing
func (*Test) GetExecutionManager ¶
func (s *Test) GetExecutionManager( shardID int32, ) (persistence.ExecutionManager, error)
GetExecutionManager for testing
func (*Test) GetFrontendClient ¶
GetFrontendClient for testing
func (*Test) GetFrontendRawClient ¶
GetFrontendRawClient for testing
func (*Test) GetFrontendServiceResolver ¶
func (s *Test) GetFrontendServiceResolver() membership.ServiceResolver
GetFrontendServiceResolver for testing
func (*Test) GetGRPCListener ¶
GetGRPCListener for testing
func (*Test) GetHistoryClient ¶
GetHistoryClient for testing
func (*Test) GetHistoryManager ¶
func (s *Test) GetHistoryManager() persistence.HistoryManager
GetHistoryManager for testing
func (*Test) GetHistoryRawClient ¶
GetHistoryRawClient for testing
func (*Test) GetHistoryServiceResolver ¶
func (s *Test) GetHistoryServiceResolver() membership.ServiceResolver
GetHistoryServiceResolver for testing
func (*Test) GetHostInfo ¶
func (s *Test) GetHostInfo() *membership.HostInfo
GetHostInfo for testing
func (*Test) GetMatchingClient ¶
GetMatchingClient for testing
func (*Test) GetMatchingRawClient ¶
GetMatchingRawClient for testing
func (*Test) GetMatchingServiceResolver ¶
func (s *Test) GetMatchingServiceResolver() membership.ServiceResolver
GetMatchingServiceResolver for testing
func (*Test) GetMembershipMonitor ¶
func (s *Test) GetMembershipMonitor() membership.Monitor
GetMembershipMonitor for testing
func (*Test) GetMessagingClient ¶
GetMessagingClient for testing
func (*Test) GetMetadataManager ¶
func (s *Test) GetMetadataManager() persistence.MetadataManager
GetMetadataManager for testing
func (*Test) GetMetricsClient ¶
GetMetricsClient for testing
func (*Test) GetNamespaceCache ¶
func (s *Test) GetNamespaceCache() cache.NamespaceCache
GetNamespaceCache for testing
func (*Test) GetNamespaceReplicationQueue ¶
func (s *Test) GetNamespaceReplicationQueue() persistence.NamespaceReplicationQueue
GetNamespaceReplicationQueue for testing
func (*Test) GetPayloadSerializer ¶
func (s *Test) GetPayloadSerializer() persistence.PayloadSerializer
GetPayloadSerializer for testing
func (*Test) GetPersistenceBean ¶
func (s *Test) GetPersistenceBean() persistenceClient.Bean
GetPersistenceBean for testing
func (*Test) GetRemoteAdminClient ¶
GetRemoteAdminClient for testing
func (*Test) GetRemoteFrontendClient ¶
GetRemoteFrontendClient for testing
func (*Test) GetShardManager ¶
func (s *Test) GetShardManager() persistence.ShardManager
GetShardManager for testing
func (*Test) GetTaskManager ¶
func (s *Test) GetTaskManager() persistence.TaskManager
GetTaskManager for testing
func (*Test) GetThrottledLogger ¶
GetThrottledLogger for testing
func (*Test) GetTimeSource ¶
func (s *Test) GetTimeSource() clock.TimeSource
GetTimeSource for testing
func (*Test) GetVisibilityManager ¶
func (s *Test) GetVisibilityManager() persistence.VisibilityManager
GetVisibilityManager for testing
func (*Test) GetWorkerServiceResolver ¶
func (s *Test) GetWorkerServiceResolver() membership.ServiceResolver
GetWorkerServiceResolver for testing
type VisibilityManagerInitializer ¶
type VisibilityManagerInitializer func( persistenceBean persistenceClient.Bean, logger log.Logger, ) (persistence.VisibilityManager, error)
VisibilityManagerInitializer is the function each service should implement for visibility manager initialization