Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMetricsServiceIdx ¶ added in v0.5.0
func GetMetricsServiceIdx(serviceName string, logger log.Logger) metrics.ServiceIdx
GetMetricsServiceIdx returns the metrics name
Types ¶
type BootstrapParams ¶
type BootstrapParams struct {
Name string
InstanceID string
Logger log.Logger
ThrottledLogger log.Logger
MetricScope tally.Scope
MembershipFactory MembershipMonitorFactory
RPCFactory common.RPCFactory
PProfInitializer common.PProfInitializer
PersistenceConfig config.Persistence
ClusterMetadata cluster.Metadata
ReplicatorConfig config.Replicator
MetricsClient metrics.Client
MessagingClient messaging.Client
ESClient es.Client
ESConfig *es.Config
DynamicConfig dynamicconfig.Client
DispatcherProvider client.DispatcherProvider
BlobstoreClient blobstore.Client
DCRedirectionPolicy config.DCRedirectionPolicy
PublicClient workflowserviceclient.Interface
HistoryArchivers map[string]archiver.HistoryArchiver
VisibilityArchivers map[string]archiver.VisibilityArchiver
}
BootstrapParams holds the set of parameters needed to bootstrap a service
func (*BootstrapParams) UpdateLoggerWithServiceName ¶ added in v0.4.0
func (params *BootstrapParams) UpdateLoggerWithServiceName(name string)
UpdateLoggerWithServiceName tag logging with service name from the top level
type MembershipMonitorFactory ¶ added in v0.5.7
type MembershipMonitorFactory interface {
// Create vends a bootstrapped membership monitor
Create(d *yarpc.Dispatcher) (membership.Monitor, error)
}
MembershipMonitorFactory provides a bootstrapped membership monitor
type Service ¶
type Service interface {
// GetHostName returns the name of host running the service
GetHostName() string
// Start the service
Start()
// Stop stops the service
Stop()
GetLogger() log.Logger
GetThrottledLogger() log.Logger
GetMetricsClient() metrics.Client
GetClientBean() client.Bean
GetTimeSource() clock.TimeSource
GetDispatcher() *yarpc.Dispatcher
GetMembershipMonitor() membership.Monitor
GetHostInfo() *membership.HostInfo
// GetClusterMetadata returns the service cluster metadata
GetClusterMetadata() cluster.Metadata
// GetMessagingClient returns the messaging client against Kafka
GetMessagingClient() messaging.Client
}
Service is the interface which must be implemented by all the services
func New ¶
func New(params *BootstrapParams) Service
New instantiates a Service Instance TODO: have a better name for Service.
func NewTestService ¶ added in v0.3.11
func NewTestService(clusterMetadata cluster.Metadata, messagingClient messaging.Client, metrics metrics.Client,
clientBean client.Bean) Service
NewTestService is the new service instance created for testing
Click to show internal directories.
Click to hide internal directories.