Documentation ¶
Overview ¶
Package resource is a generated GoMock package.
Index ¶
- Variables
- func ArchivalMetadataProvider(params *BootstrapParams) archiver.ArchivalMetadata
- func ArchiverProviderProvider(params *BootstrapParams) provider.ArchiverProvider
- func ClientBeanProvider(clientFactory client.Factory, clusterMetadata cluster.Metadata) (client.Bean, error)
- func ClientFactoryProvider(factoryProvider client.FactoryProvider, rpcFactory common.RPCFactory, ...) client.Factory
- func FrontedClientProvider(clientBean client.Bean) workflowservice.WorkflowServiceClient
- func GrpcListenerProvider(factory common.RPCFactory) net.Listener
- func HistoryBootstrapContainerProvider(logger SnTaggedLogger, metricsClient metrics.Client, ...) *archiver.HistoryBootstrapContainer
- func HistoryClientProvider(clientBean client.Bean) historyservice.HistoryServiceClient
- func HostInfoProviderLifetimeHooks(lc fx.Lifecycle, provider HostInfoProvider)
- func MembershipMonitorProvider(membershipFactory MembershipMonitorFactory) (membership.Monitor, error)
- func MetricsClientProvider(params *BootstrapParams) metrics.Client
- func MetricsUserScopeProvider(serverMetricsClient metrics.Client) metrics.UserScope
- func NamespaceRegistryProvider(logger SnTaggedLogger, metricsClient metrics.Client, ...) namespace.Registry
- func PersistenceConfigProvider(params *BootstrapParams) *config.Persistence
- func PersistenceFaultInjectionFactoryProvider(factory persistenceClient.Factory) *persistenceClient.FaultInjectionDataStoreFactory
- func RegisterBootstrapContainer(archiverProvider provider.ArchiverProvider, serviceName ServiceName, ...) error
- func RingpopChannelLifetimeHooks(lc fx.Lifecycle, ch *tchannel.Channel)
- func RingpopChannelProvider(rpcFactory common.RPCFactory) *tchannel.Channel
- func RuntimeMetricsReporterProvider(metricsScope metrics.UserScope, logger SnTaggedLogger, instanceID InstanceID) *metrics.RuntimeMetricsReporter
- func SdkClientFactoryProvider(params *BootstrapParams) sdk.ClientFactory
- func SearchAttributeManagerProvider(timeSource clock.TimeSource, cmMgr persistence.ClusterMetadataManager, ...) searchattribute.Manager
- func SearchAttributeProviderProvider(timeSource clock.TimeSource, cmMgr persistence.ClusterMetadataManager, ...) searchattribute.Provider
- func TimeSourceProvider() clock.TimeSource
- func VisibilityBootstrapContainerProvider(logger SnTaggedLogger, metricsClient metrics.Client, ...) *archiver.VisibilityBootstrapContainer
- type BootstrapParams
- type CachingHostInfoProvider
- type HostInfoProvider
- type HostName
- type InstanceID
- type MatchingClient
- type MatchingRawClient
- type MembershipFactoryInitializerFunc
- type MembershipMonitorFactory
- type MockHostInfoProvider
- type MockHostInfoProviderMockRecorder
- type ServiceName
- type SnTaggedLogger
- type Test
- func (t *Test) GetArchivalMetadata() archiver.ArchivalMetadata
- func (t *Test) GetArchiverProvider() provider.ArchiverProvider
- func (t *Test) GetClientBean() client.Bean
- func (t *Test) GetClientFactory() client.Factory
- func (t *Test) GetClusterMetadata() cluster.Metadata
- func (t *Test) GetClusterMetadataManager() persistence.ClusterMetadataManager
- func (t *Test) GetExecutionManager() persistence.ExecutionManager
- func (t *Test) GetFaultInjection() *persistenceClient.FaultInjectionDataStoreFactory
- func (t *Test) GetFrontendClient() workflowservice.WorkflowServiceClient
- func (t *Test) GetFrontendServiceResolver() membership.ServiceResolver
- func (t *Test) GetGRPCListener() net.Listener
- func (t *Test) GetHistoryClient() historyservice.HistoryServiceClient
- func (t *Test) GetHistoryRawClient() historyservice.HistoryServiceClient
- func (t *Test) GetHistoryServiceResolver() membership.ServiceResolver
- func (t *Test) GetHostInfo() *membership.HostInfo
- func (t *Test) GetHostName() string
- func (t *Test) GetLogger() log.Logger
- func (t *Test) GetMatchingClient() matchingservice.MatchingServiceClient
- func (t *Test) GetMatchingRawClient() matchingservice.MatchingServiceClient
- func (t *Test) GetMatchingServiceResolver() membership.ServiceResolver
- func (t *Test) GetMembershipMonitor() membership.Monitor
- func (t *Test) GetMetadataManager() persistence.MetadataManager
- func (t *Test) GetMetricsClient() metrics.Client
- func (t *Test) GetNamespaceRegistry() namespace.Registry
- func (t *Test) GetNamespaceReplicationQueue() persistence.NamespaceReplicationQueue
- func (t *Test) GetPayloadSerializer() serialization.Serializer
- func (t *Test) GetPersistenceBean() persistenceClient.Bean
- func (t *Test) GetRemoteAdminClient(cluster string) adminservice.AdminServiceClient
- func (t *Test) GetRemoteFrontendClient(cluster string) workflowservice.WorkflowServiceClient
- func (t *Test) GetSDKClientFactory() sdk.ClientFactory
- func (t *Test) GetSearchAttributesManager() searchattribute.Manager
- func (t *Test) GetSearchAttributesMapper() searchattribute.Mapper
- func (t *Test) GetSearchAttributesProvider() searchattribute.Provider
- func (t *Test) GetServiceName() string
- func (t *Test) GetShardManager() persistence.ShardManager
- func (t *Test) GetTaskManager() persistence.TaskManager
- func (t *Test) GetThrottledLogger() log.Logger
- func (t *Test) GetTimeSource() clock.TimeSource
- func (t *Test) GetWorkerServiceResolver() membership.ServiceResolver
- func (t *Test) RefreshNamespaceCache()
- func (t *Test) Start()
- func (t *Test) Stop()
- type ThrottledLogger
- type ThrottledLoggerRpsFn
Constants ¶
This section is empty.
Variables ¶
var HostInfoProviderModule = fx.Options( fx.Provide(NewHostInfoProvider), fx.Invoke(HostInfoProviderLifetimeHooks), )
var Module = fx.Options( persistenceClient.Module, fx.Provide(SnTaggedLoggerProvider), fx.Provide(ThrottledLoggerProvider), fx.Provide(PersistenceConfigProvider), fx.Provide(HostNameProvider), fx.Provide(ServiceNameProvider), fx.Provide(TimeSourceProvider), cluster.MetadataLifetimeHooksModule, fx.Provide(MetricsClientProvider), fx.Provide(MetricsUserScopeProvider), fx.Provide(SearchAttributeProviderProvider), fx.Provide(SearchAttributeManagerProvider), fx.Provide(NamespaceRegistryProvider), namespace.RegistryLifetimeHooksModule, fx.Provide(serialization.NewSerializer), fx.Provide(ArchivalMetadataProvider), fx.Provide(ArchiverProviderProvider), fx.Provide(HistoryBootstrapContainerProvider), fx.Provide(VisibilityBootstrapContainerProvider), fx.Provide(MembershipFactoryProvider), fx.Provide(MembershipMonitorProvider), membership.MonitorLifetimeHooksModule, fx.Provide(ClientFactoryProvider), fx.Provide(ClientBeanProvider), sdk.Module, fx.Provide(SdkClientFactoryProvider), fx.Provide(FrontedClientProvider), fx.Provide(PersistenceFaultInjectionFactoryProvider), fx.Provide(GrpcListenerProvider), fx.Provide(InstanceIDProvider), fx.Provide(RingpopChannelProvider), fx.Invoke(RingpopChannelLifetimeHooks), fx.Provide(RuntimeMetricsReporterProvider), metrics.RuntimeMetricsReporterLifetimeHooksModule, fx.Provide(HistoryClientProvider), fx.Provide(MatchingRawClientProvider), fx.Provide(MatchingClientProvider), HostInfoProviderModule, fx.Invoke(RegisterBootstrapContainer), )
Module Use fx.Hook and OnStart/OnStop to manage Daemon resource lifecycle See LifetimeHooksModule for detail
Functions ¶
func ArchivalMetadataProvider ¶ added in v1.13.0
func ArchivalMetadataProvider(params *BootstrapParams) archiver.ArchivalMetadata
func ArchiverProviderProvider ¶ added in v1.13.0
func ArchiverProviderProvider(params *BootstrapParams) provider.ArchiverProvider
func ClientBeanProvider ¶ added in v1.13.0
func ClientFactoryProvider ¶ added in v1.13.0
func ClientFactoryProvider( factoryProvider client.FactoryProvider, rpcFactory common.RPCFactory, membershipMonitor membership.Monitor, metricsClient metrics.Client, dynamicCollection *dynamicconfig.Collection, persistenceConfig *config.Persistence, logger SnTaggedLogger, throttledLogger ThrottledLogger, ) client.Factory
func FrontedClientProvider ¶ added in v1.13.0
func GrpcListenerProvider ¶ added in v1.13.0
func GrpcListenerProvider(factory common.RPCFactory) net.Listener
func HistoryBootstrapContainerProvider ¶ added in v1.13.0
func HistoryBootstrapContainerProvider( logger SnTaggedLogger, metricsClient metrics.Client, clusterMetadata cluster.Metadata, executionManager persistence.ExecutionManager, ) *archiver.HistoryBootstrapContainer
func HistoryClientProvider ¶ added in v1.14.0
func HostInfoProviderLifetimeHooks ¶ added in v1.14.0
func HostInfoProviderLifetimeHooks( lc fx.Lifecycle, provider HostInfoProvider, )
func MembershipMonitorProvider ¶ added in v1.13.0
func MembershipMonitorProvider(membershipFactory MembershipMonitorFactory) (membership.Monitor, error)
TODO: Seems that this factory mostly handles singleton logic. We should be able to handle it via IOC.
func MetricsClientProvider ¶ added in v1.13.0
func MetricsClientProvider(params *BootstrapParams) metrics.Client
func MetricsUserScopeProvider ¶ added in v1.15.0
func NamespaceRegistryProvider ¶ added in v1.14.0
func NamespaceRegistryProvider( logger SnTaggedLogger, metricsClient metrics.Client, clusterMetadata cluster.Metadata, metadataManager persistence.MetadataManager, ) namespace.Registry
func PersistenceConfigProvider ¶ added in v1.13.0
func PersistenceConfigProvider(params *BootstrapParams) *config.Persistence
func PersistenceFaultInjectionFactoryProvider ¶ added in v1.13.0
func PersistenceFaultInjectionFactoryProvider(factory persistenceClient.Factory) *persistenceClient.FaultInjectionDataStoreFactory
func RegisterBootstrapContainer ¶ added in v1.13.0
func RegisterBootstrapContainer( archiverProvider provider.ArchiverProvider, serviceName ServiceName, visibilityArchiverBootstrapContainer *archiver.VisibilityBootstrapContainer, historyArchiverBootstrapContainer *archiver.HistoryBootstrapContainer, ) error
func RingpopChannelLifetimeHooks ¶ added in v1.14.0
func RingpopChannelProvider ¶ added in v1.13.0
func RingpopChannelProvider(rpcFactory common.RPCFactory) *tchannel.Channel
func RuntimeMetricsReporterProvider ¶ added in v1.13.0
func RuntimeMetricsReporterProvider( metricsScope metrics.UserScope, logger SnTaggedLogger, instanceID InstanceID, ) *metrics.RuntimeMetricsReporter
func SdkClientFactoryProvider ¶ added in v1.14.0
func SdkClientFactoryProvider(params *BootstrapParams) sdk.ClientFactory
TODO (alex): move this to `sdk` package after BootstrapParams removal.
func SearchAttributeManagerProvider ¶ added in v1.13.0
func SearchAttributeManagerProvider( timeSource clock.TimeSource, cmMgr persistence.ClusterMetadataManager, dynamicCollection *dynamicconfig.Collection, ) searchattribute.Manager
func SearchAttributeProviderProvider ¶ added in v1.13.0
func SearchAttributeProviderProvider( timeSource clock.TimeSource, cmMgr persistence.ClusterMetadataManager, dynamicCollection *dynamicconfig.Collection, ) searchattribute.Provider
func TimeSourceProvider ¶ added in v1.13.0
func TimeSourceProvider() clock.TimeSource
func VisibilityBootstrapContainerProvider ¶ added in v1.13.0
func VisibilityBootstrapContainerProvider( logger SnTaggedLogger, metricsClient metrics.Client, clusterMetadata cluster.Metadata, ) *archiver.VisibilityBootstrapContainer
Types ¶
type BootstrapParams ¶
type BootstrapParams struct { Name string InstanceID string ThrottledLogger log.Logger NamespaceLogger log.Logger MembershipFactoryInitializer MembershipFactoryInitializerFunc RPCFactory common.RPCFactory ClientFactoryProvider client.FactoryProvider PersistenceConfig config.Persistence ClusterMetadataConfig *cluster.Config ReplicatorConfig config.Replicator ServerMetricsReporter metrics.Reporter SDKMetricsReporter metrics.Reporter MetricsClient metrics.Client DCRedirectionPolicy config.DCRedirectionPolicy SdkClientFactory sdk.ClientFactory ArchivalMetadata archiver.ArchivalMetadata ArchiverProvider provider.ArchiverProvider }
BootstrapParams holds the set of parameters needed to bootstrap a service
type CachingHostInfoProvider ¶ added in v1.14.0
type CachingHostInfoProvider struct {
// contains filtered or unexported fields
}
func (*CachingHostInfoProvider) HostInfo ¶ added in v1.14.0
func (hip *CachingHostInfoProvider) HostInfo() *membership.HostInfo
func (*CachingHostInfoProvider) Start ¶ added in v1.14.0
func (hip *CachingHostInfoProvider) Start() error
type HostInfoProvider ¶ added in v1.14.0
type HostInfoProvider interface { Start() error HostInfo() *membership.HostInfo }
func NewHostInfoProvider ¶ added in v1.14.0
func NewHostInfoProvider(membershipMonitor membership.Monitor) HostInfoProvider
type InstanceID ¶ added in v1.13.0
type InstanceID string
func InstanceIDProvider ¶ added in v1.13.0
func InstanceIDProvider(params *BootstrapParams) InstanceID
type MatchingClient ¶ added in v1.14.0
type MatchingClient matchingservice.MatchingServiceClient
func MatchingClientProvider ¶ added in v1.14.0
func MatchingClientProvider(matchingRawClient MatchingRawClient) MatchingClient
type MatchingRawClient ¶ added in v1.14.0
type MatchingRawClient matchingservice.MatchingServiceClient
func MatchingRawClientProvider ¶ added in v1.14.0
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
func MembershipFactoryProvider ¶ added in v1.13.0
func MembershipFactoryProvider( params *BootstrapParams, persistenceBean persistenceClient.Bean, logger SnTaggedLogger, ) (MembershipMonitorFactory, error)
type MockHostInfoProvider ¶ added in v1.14.0
type MockHostInfoProvider struct {
// contains filtered or unexported fields
}
MockHostInfoProvider is a mock of HostInfoProvider interface.
func NewMockHostInfoProvider ¶ added in v1.14.0
func NewMockHostInfoProvider(ctrl *gomock.Controller) *MockHostInfoProvider
NewMockHostInfoProvider creates a new mock instance.
func (*MockHostInfoProvider) EXPECT ¶ added in v1.14.0
func (m *MockHostInfoProvider) EXPECT() *MockHostInfoProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockHostInfoProvider) HostInfo ¶ added in v1.14.0
func (m *MockHostInfoProvider) HostInfo() *membership.HostInfo
HostInfo mocks base method.
func (*MockHostInfoProvider) Start ¶ added in v1.14.0
func (m *MockHostInfoProvider) Start() error
Start mocks base method.
type MockHostInfoProviderMockRecorder ¶ added in v1.14.0
type MockHostInfoProviderMockRecorder struct {
// contains filtered or unexported fields
}
MockHostInfoProviderMockRecorder is the mock recorder for MockHostInfoProvider.
func (*MockHostInfoProviderMockRecorder) HostInfo ¶ added in v1.14.0
func (mr *MockHostInfoProviderMockRecorder) HostInfo() *gomock.Call
HostInfo indicates an expected call of HostInfo.
func (*MockHostInfoProviderMockRecorder) Start ¶ added in v1.14.0
func (mr *MockHostInfoProviderMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
type ServiceName ¶ added in v1.13.0
type ServiceName string
func ServiceNameProvider ¶ added in v1.13.0
func ServiceNameProvider(params *BootstrapParams) ServiceName
type SnTaggedLogger ¶ added in v1.13.0
func SnTaggedLoggerProvider ¶ added in v1.13.0
func SnTaggedLoggerProvider(logger log.Logger, sn ServiceName) SnTaggedLogger
type Test ¶
type Test struct { MetricsScope tally.Scope ClusterMetadata *cluster.MockMetadata SearchAttributesProvider *searchattribute.MockProvider SearchAttributesManager *searchattribute.MockManager SearchAttributesMapper *searchattribute.MockMapper NamespaceCache *namespace.MockRegistry TimeSource clock.TimeSource PayloadSerializer serialization.Serializer MetricsClient metrics.Client ArchivalMetadata *archiver.MockArchivalMetadata ArchiverProvider *provider.MockArchiverProvider MembershipMonitor *membership.MockMonitor FrontendServiceResolver *membership.MockServiceResolver MatchingServiceResolver *membership.MockServiceResolver HistoryServiceResolver *membership.MockServiceResolver WorkerServiceResolver *membership.MockServiceResolver SDKClientFactory *sdk.MockClientFactory FrontendClient *workflowservicemock.MockWorkflowServiceClient MatchingClient *matchingservicemock.MockMatchingServiceClient HistoryClient *historyservicemock.MockHistoryServiceClient RemoteAdminClient *adminservicemock.MockAdminServiceClient RemoteFrontendClient *workflowservicemock.MockWorkflowServiceClient ClientBean *client.MockBean ClientFactory *client.MockFactory ESClient *esclient.MockClient MetadataMgr *persistence.MockMetadataManager ClusterMetadataMgr *persistence.MockClusterMetadataManager TaskMgr *persistence.MockTaskManager NamespaceReplicationQueue persistence.NamespaceReplicationQueue ShardMgr *persistence.MockShardManager ExecutionMgr *persistence.MockExecutionManager 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 (t *Test) GetArchivalMetadata() archiver.ArchivalMetadata
GetArchivalMetadata for testing
func (*Test) GetArchiverProvider ¶
func (t *Test) GetArchiverProvider() provider.ArchiverProvider
GetArchiverProvider for testing
func (*Test) GetClientFactory ¶ added in v1.14.0
GetClientFactory for testing
func (*Test) GetClusterMetadata ¶
GetClusterMetadata for testing
func (*Test) GetClusterMetadataManager ¶ added in v1.1.0
func (t *Test) GetClusterMetadataManager() persistence.ClusterMetadataManager
GetClusterMetadata for testing
func (*Test) GetExecutionManager ¶
func (t *Test) GetExecutionManager() persistence.ExecutionManager
GetExecutionManager for testing
func (*Test) GetFaultInjection ¶ added in v1.13.0
func (t *Test) GetFaultInjection() *persistenceClient.FaultInjectionDataStoreFactory
func (*Test) GetFrontendClient ¶
func (t *Test) GetFrontendClient() workflowservice.WorkflowServiceClient
GetFrontendClient for testing
func (*Test) GetFrontendServiceResolver ¶
func (t *Test) GetFrontendServiceResolver() membership.ServiceResolver
GetFrontendServiceResolver for testing
func (*Test) GetGRPCListener ¶
GetGRPCListener for testing
func (*Test) GetHistoryClient ¶
func (t *Test) GetHistoryClient() historyservice.HistoryServiceClient
GetHistoryClient for testing
func (*Test) GetHistoryRawClient ¶
func (t *Test) GetHistoryRawClient() historyservice.HistoryServiceClient
GetHistoryRawClient for testing
func (*Test) GetHistoryServiceResolver ¶
func (t *Test) GetHistoryServiceResolver() membership.ServiceResolver
GetHistoryServiceResolver for testing
func (*Test) GetHostInfo ¶
func (t *Test) GetHostInfo() *membership.HostInfo
GetHostInfo for testing
func (*Test) GetMatchingClient ¶
func (t *Test) GetMatchingClient() matchingservice.MatchingServiceClient
GetMatchingClient for testing
func (*Test) GetMatchingRawClient ¶
func (t *Test) GetMatchingRawClient() matchingservice.MatchingServiceClient
GetMatchingRawClient for testing
func (*Test) GetMatchingServiceResolver ¶
func (t *Test) GetMatchingServiceResolver() membership.ServiceResolver
GetMatchingServiceResolver for testing
func (*Test) GetMembershipMonitor ¶
func (t *Test) GetMembershipMonitor() membership.Monitor
GetMembershipMonitor for testing
func (*Test) GetMetadataManager ¶
func (t *Test) GetMetadataManager() persistence.MetadataManager
GetMetadataManager for testing
func (*Test) GetMetricsClient ¶
GetMetricsClient for testing
func (*Test) GetNamespaceRegistry ¶ added in v1.13.0
GetNamespaceRegistry for testing
func (*Test) GetNamespaceReplicationQueue ¶
func (t *Test) GetNamespaceReplicationQueue() persistence.NamespaceReplicationQueue
GetNamespaceReplicationQueue for testing
func (*Test) GetPayloadSerializer ¶
func (t *Test) GetPayloadSerializer() serialization.Serializer
GetPayloadSerializer for testing
func (*Test) GetPersistenceBean ¶
func (t *Test) GetPersistenceBean() persistenceClient.Bean
GetPersistenceBean for testing
func (*Test) GetRemoteAdminClient ¶
GetRemoteAdminClient for testing
func (*Test) GetRemoteFrontendClient ¶
GetRemoteFrontendClient for testing
func (*Test) GetSDKClientFactory ¶ added in v1.14.0
func (t *Test) GetSDKClientFactory() sdk.ClientFactory
GetSDKClientFactory for testing
func (*Test) GetSearchAttributesManager ¶ added in v1.11.0
func (t *Test) GetSearchAttributesManager() searchattribute.Manager
func (*Test) GetSearchAttributesMapper ¶ added in v1.12.1
func (t *Test) GetSearchAttributesMapper() searchattribute.Mapper
func (*Test) GetSearchAttributesProvider ¶ added in v1.10.0
func (t *Test) GetSearchAttributesProvider() searchattribute.Provider
func (*Test) GetShardManager ¶
func (t *Test) GetShardManager() persistence.ShardManager
GetShardManager for testing
func (*Test) GetTaskManager ¶
func (t *Test) GetTaskManager() persistence.TaskManager
GetTaskManager for testing
func (*Test) GetThrottledLogger ¶
GetThrottledLogger for testing
func (*Test) GetTimeSource ¶
func (t *Test) GetTimeSource() clock.TimeSource
GetTimeSource for testing
func (*Test) GetWorkerServiceResolver ¶
func (t *Test) GetWorkerServiceResolver() membership.ServiceResolver
GetWorkerServiceResolver for testing
func (*Test) RefreshNamespaceCache ¶ added in v1.13.0
func (t *Test) RefreshNamespaceCache()
type ThrottledLogger ¶ added in v1.13.0
func ThrottledLoggerProvider ¶ added in v1.13.0
func ThrottledLoggerProvider( logger SnTaggedLogger, fn ThrottledLoggerRpsFn, ) ThrottledLogger