resource

package
v1.18.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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(dc *dynamicconfig.Collection, cfg *config.Config) archiver.ArchivalMetadata

func ArchiverProviderProvider added in v1.13.0

func ArchiverProviderProvider(cfg *config.Config) provider.ArchiverProvider

func ClientBeanProvider added in v1.13.0

func ClientBeanProvider(
	clientFactory client.Factory,
	clusterMetadata cluster.Metadata,
) (client.Bean, error)

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 DCRedirectionPolicyProvider added in v1.16.0

func DCRedirectionPolicyProvider(cfg *config.Config) config.DCRedirectionPolicy

func FrontendClientProvider added in v1.17.0

func FrontendClientProvider(clientBean client.Bean) workflowservice.WorkflowServiceClient

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 HistoryClientProvider(clientBean client.Bean) historyservice.HistoryServiceClient

func MembershipMonitorProvider added in v1.13.0

func MembershipMonitorProvider(
	lc fx.Lifecycle,
	clusterMetadataManager persistence.ClusterMetadataManager,
	logger SnTaggedLogger,
	cfg *config.Config,
	svcName ServiceName,
	tlsConfigProvider encryption.TLSConfigProvider,
	dc *dynamicconfig.Collection,
) (membership.Monitor, error)

func MetricsClientProvider added in v1.13.0

func MetricsClientProvider(logger log.Logger, serviceName ServiceName, provider metrics.MetricsHandler) metrics.Client

TODO: rework to depend on...

func NamespaceRegistryProvider added in v1.14.0

func NamespaceRegistryProvider(
	logger SnTaggedLogger,
	metricsClient metrics.Client,
	clusterMetadata cluster.Metadata,
	metadataManager persistence.MetadataManager,
	dynamicCollection *dynamicconfig.Collection,
) namespace.Registry

func PersistenceConfigProvider added in v1.13.0

func PersistenceConfigProvider(persistenceConfig config.Persistence, dc *dynamicconfig.Collection) *config.Persistence

func RPCFactoryProvider added in v1.16.0

func RPCFactoryProvider(
	cfg *config.Config,
	svcName ServiceName,
	logger log.Logger,
	tlsConfigProvider encryption.TLSConfigProvider,
	dc *dynamicconfig.Collection,
	resolver membership.GRPCResolver,
	traceInterceptor telemetry.ClientTraceInterceptor,
) common.RPCFactory

func RegisterBootstrapContainer added in v1.13.0

func RegisterBootstrapContainer(
	archiverProvider provider.ArchiverProvider,
	serviceName ServiceName,
	visibilityArchiverBootstrapContainer *archiver.VisibilityBootstrapContainer,
	historyArchiverBootstrapContainer *archiver.HistoryBootstrapContainer,
) error

func RuntimeMetricsReporterProvider added in v1.13.0

func RuntimeMetricsReporterProvider(
	params RuntimeMetricsReporterParams,
) *metrics.RuntimeMetricsReporter

func SdkClientFactoryProvider added in v1.14.0

func SdkClientFactoryProvider(
	cfg *config.Config,
	tlsConfigProvider encryption.TLSConfigProvider,
	metricsHandler metrics.MetricsHandler,
	logger SnTaggedLogger,
	resolver membership.GRPCResolver,
) (sdk.ClientFactory, error)

func SdkWorkerFactoryProvider added in v1.17.0

func SdkWorkerFactoryProvider() sdk.WorkerFactory

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 HostName added in v1.13.0

type HostName string

func HostNameProvider added in v1.13.0

func HostNameProvider() (HostName, error)

type InstanceID added in v1.13.0

type InstanceID string

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

func MatchingRawClientProvider(clientBean client.Bean, namespaceRegistry namespace.Registry) (
	MatchingRawClient,
	error,
)

type NamespaceLogger added in v1.16.0

type NamespaceLogger log.Logger

type RuntimeMetricsReporterParams added in v1.16.0

type RuntimeMetricsReporterParams struct {
	fx.In

	Provider   metrics.MetricsHandler
	Logger     SnTaggedLogger
	InstanceID InstanceID `optional:"true"`
}

type ServiceName added in v1.13.0

type ServiceName string

type ServiceNames added in v1.16.0

type ServiceNames map[string]struct{}

type SnTaggedLogger added in v1.13.0

type SnTaggedLogger log.Logger

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) GetClientBean

func (t *Test) GetClientBean() client.Bean

GetClientBean for testing

func (*Test) GetClientFactory added in v1.14.0

func (t *Test) GetClientFactory() client.Factory

GetClientFactory for testing

func (*Test) GetClusterMetadata

func (t *Test) GetClusterMetadata() cluster.Metadata

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) 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

func (t *Test) GetGRPCListener() net.Listener

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) GetHostName

func (t *Test) GetHostName() string

GetHostName for testing

func (*Test) GetLogger

func (t *Test) GetLogger() log.Logger

GetLogger 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

func (t *Test) GetMetricsClient() metrics.Client

GetMetricsClient for testing

func (*Test) GetNamespaceRegistry added in v1.13.0

func (t *Test) GetNamespaceRegistry() namespace.Registry

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

func (t *Test) GetRemoteAdminClient(
	cluster string,
) adminservice.AdminServiceClient

GetRemoteAdminClient for testing

func (*Test) GetRemoteFrontendClient

func (t *Test) GetRemoteFrontendClient(
	cluster string,
) workflowservice.WorkflowServiceClient

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) GetServiceName

func (t *Test) GetServiceName() string

GetServiceName for testing

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

func (t *Test) GetThrottledLogger() log.Logger

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()

func (*Test) Start

func (t *Test) Start()

Start for testing

func (*Test) Stop

func (t *Test) Stop()

Stop for testing

type ThrottledLogger added in v1.13.0

type ThrottledLogger log.Logger

func ThrottledLoggerProvider added in v1.13.0

func ThrottledLoggerProvider(
	logger SnTaggedLogger,
	fn ThrottledLoggerRpsFn,
) ThrottledLogger

type ThrottledLoggerRpsFn added in v1.13.0

type ThrottledLoggerRpsFn quotas.RateFn

Jump to

Keyboard shortcuts

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