Documentation ¶
Index ¶
- Variables
- func InterruptCh() <-chan interface{}
- type Server
- type ServerOption
- func ForServices(names []string) ServerOption
- func InterruptOn(interruptCh <-chan interface{}) ServerOption
- func WithAudienceGetter(audienceGetter func(cfg *config.Config) authorization.JWTAudienceMapper) ServerOption
- func WithAuthorizer(authorizer authorization.Authorizer) ServerOption
- func WithClaimMapper(claimMapper func(cfg *config.Config) authorization.ClaimMapper) ServerOption
- func WithClientFactoryProvider(clientFactoryProvider client.FactoryProvider) ServerOption
- func WithConfig(cfg *config.Config) ServerOption
- func WithConfigLoader(configDir string, env string, zone string) ServerOption
- func WithCustomDataStoreFactory(customFactory persistenceclient.AbstractDataStoreFactory) ServerOption
- func WithCustomMetricsReporter(reporter interface{}) ServerOption
- func WithDynamicConfigClient(c dynamicconfig.Client) ServerOption
- func WithElasticsearchHttpClient(c *http.Client) ServerOption
- func WithLogger(logger log.Logger) ServerOption
- func WithNamespaceLogger(namespaceLogger log.Logger) ServerOption
- func WithPersistenceServiceResolver(r resolver.ServiceResolver) ServerOption
- func WithSearchAttributesMapper(m searchattribute.Mapper) ServerOption
- func WithTLSConfigFactory(tlsConfigProvider encryption.TLSConfigProvider) ServerOption
Constants ¶
This section is empty.
Variables ¶
var ( Services = []string{ primitives.FrontendService, primitives.HistoryService, primitives.MatchingService, primitives.WorkerService, } )
Services is the list of all valid temporal services
Functions ¶
func InterruptCh ¶
func InterruptCh() <-chan interface{}
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is temporal server.
func NewServer ¶
func NewServer(opts ...ServerOption) *Server
NewServer returns a new instance of server that serves one or many services.
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
func ForServices ¶
func ForServices(names []string) ServerOption
func InterruptOn ¶
func InterruptOn(interruptCh <-chan interface{}) ServerOption
InterruptOn interrupts server on the signal from server. If channel is nil Start() will block forever.
func WithAudienceGetter ¶ added in v1.10.3
func WithAudienceGetter(audienceGetter func(cfg *config.Config) authorization.JWTAudienceMapper) ServerOption
Configures JWT audience getter for authorization
func WithAuthorizer ¶
func WithAuthorizer(authorizer authorization.Authorizer) ServerOption
Sets low level authorizer to allow/deny all API calls
func WithClaimMapper ¶ added in v1.4.0
func WithClaimMapper(claimMapper func(cfg *config.Config) authorization.ClaimMapper) ServerOption
Configures a role mapper for authorization
func WithClientFactoryProvider ¶ added in v1.11.0
func WithClientFactoryProvider(clientFactoryProvider client.FactoryProvider) ServerOption
WithClientFactoryProvider sets a custom ClientFactoryProvider NOTE: this option is experimental and may be changed or removed in future release.
func WithConfig ¶
func WithConfig(cfg *config.Config) ServerOption
func WithConfigLoader ¶
func WithConfigLoader(configDir string, env string, zone string) ServerOption
func WithCustomDataStoreFactory ¶ added in v1.11.0
func WithCustomDataStoreFactory(customFactory persistenceclient.AbstractDataStoreFactory) ServerOption
WithCustomDataStoreFactory sets a custom AbstractDataStoreFactory NOTE: this option is experimental and may be changed or removed in future release.
func WithCustomMetricsReporter ¶ added in v1.4.0
func WithCustomMetricsReporter(reporter interface{}) ServerOption
Set custom metric reporter for (deprecated) Tally it should be tally.BaseStatsReporter for Prometheus with framework metrics.FrameworkCustom it should be metrics.Reporter not used otherwise TODO: replace argument type with metrics.Reporter once tally is deprecated.
func WithDynamicConfigClient ¶ added in v1.5.7
func WithDynamicConfigClient(c dynamicconfig.Client) ServerOption
Set custom dynmaic config client
func WithElasticsearchHttpClient ¶ added in v1.5.7
func WithElasticsearchHttpClient(c *http.Client) ServerOption
Set custom persistence service resolver which will convert service name or address value from config to another a....
func WithLogger ¶ added in v1.5.7
func WithLogger(logger log.Logger) ServerOption
func WithNamespaceLogger ¶ added in v1.11.0
func WithNamespaceLogger(namespaceLogger log.Logger) ServerOption
Sets optional logger for all frontend operations
func WithPersistenceServiceResolver ¶ added in v1.5.7
func WithPersistenceServiceResolver(r resolver.ServiceResolver) ServerOption
Set custom persistence service resolver which will convert service name or address value from config to another a....
func WithSearchAttributesMapper ¶ added in v1.12.1
func WithSearchAttributesMapper(m searchattribute.Mapper) ServerOption
Set custom search attributes mapper which converts search attributes aliases to field names and vice versa.
func WithTLSConfigFactory ¶
func WithTLSConfigFactory(tlsConfigProvider encryption.TLSConfigProvider) ServerOption
Overrides default provider of TLS configuration