temporal

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: MIT Imports: 39 Imported by: 16

Documentation

Index

Constants

This section is empty.

Variables

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.

func (*Server) Start

func (s *Server) Start() error

Start temporal server.

func (*Server) Stop

func (s *Server) Stop()

Stop stops the server.

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

Jump to

Keyboard shortcuts

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