client

package
v1.0.19 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricsTypeSummary string = "summary"
)
View Source
const PluginName = "temporal"

PluginName defines public service name.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Address    string
	Namespace  string
	Metrics    *Metrics
	Activities *pool.Config
	Codec      string
	DebugLevel int `mapstructure:"debug_level"`
	CacheSize  int `mapstructure:"cache_size"`
}

Config of the temporal client and depended services.

func (*Config) InitDefault added in v1.0.9

func (c *Config) InitDefault()

type Metrics added in v1.0.9

type Metrics struct {
	Address string `mapstructure:"address"`
	Type    string `mapstructure:"type"`
	Prefix  string `mapstructure:"prefix"`
}

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

Plugin implement Temporal contract.

func (*Plugin) CreateWorker

func (p *Plugin) CreateWorker(tq string, options worker.Options) (worker.Worker, error)

CreateWorker allocates new temporal worker on an active connection.

func (*Plugin) GetClient

func (p *Plugin) GetClient() client.Client

GetClient returns active srv connection.

func (*Plugin) GetCodec

func (p *Plugin) GetCodec() rrt.Codec

GetCodec returns communication codec.

func (*Plugin) GetConfig

func (p *Plugin) GetConfig() Config

GetConfig returns temporal configuration.

func (*Plugin) GetDataConverter

func (p *Plugin) GetDataConverter() converter.DataConverter

GetDataConverter returns data active data converter.

func (*Plugin) Init

func (p *Plugin) Init(cfg config.Configurer, log logger.Logger) error

Init initiates temporal client plugin.

func (*Plugin) Name

func (p *Plugin) Name() string

Name of the service.

func (*Plugin) Serve

func (p *Plugin) Serve() chan error

Serve starts temporal srv.

func (*Plugin) Stop

func (p *Plugin) Stop() error

Stop stops temporal srv connection.

type Temporal

type Temporal interface {
	GetClient() client.Client
	GetDataConverter() converter.DataConverter
	GetConfig() Config
	GetCodec() rrt.Codec
	CreateWorker(taskQueue string, options worker.Options) (worker.Worker, error)
}

Temporal define common interface for RoadRunner plugins.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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