service

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: MIT Imports: 24 Imported by: 19

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
	BlobstoreClient     blobstore.Client
	ESClient            es.GenericClient
	ESConfig            *config.ElasticSearchConfig
	DynamicConfig       dynamicconfig.Client
	DispatcherProvider  client.DispatcherProvider
	DCRedirectionPolicy config.DCRedirectionPolicy
	PublicClient        workflowserviceclient.Interface
	ArchivalMetadata    archiver.ArchivalMetadata
	ArchiverProvider    provider.ArchiverProvider
	Authorizer          authorization.Authorizer
}

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 {
	// GetMembershipMonitor return a membership monitor
	GetMembershipMonitor() (membership.Monitor, error)
}

MembershipMonitorFactory provides a bootstrapped membership monitor

type Service

type Service interface {
	GetHostName() string
	Start()
	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() cluster.Metadata
	GetMessagingClient() messaging.Client
	GetBlobstoreClient() blobstore.Client
	GetArchivalMetadata() archiver.ArchivalMetadata
	GetArchiverProvider() provider.ArchiverProvider
	GetPayloadSerializer() persistence.PayloadSerializer
}

Service is the interface which must be implemented by all the services TODO: Service contains many methods that are not used now that we have resource bean, these should be cleaned up

func New

func New(params *BootstrapParams) Service

New instantiates a Service Instance TODO: have a better name for Service.

Directories

Path Synopsis
Package dynamicconfig is a generated GoMock package.
Package dynamicconfig is a generated GoMock package.

Jump to

Keyboard shortcuts

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