roadrunner_temporal

package module
v1.4.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: MIT Imports: 29 Imported by: 1

README

Linux Discourse

Roadrunner Temporal

The repository contains a number of plugins which enable workflow and activity processing for PHP processes. The communication protocol, supervisor, load-balancer is based on RoadRunner PHP Application Server.

Installation

Temporal is official plugin of RoadRunner and available out of the box in RoadRunner 2.0.

Read more about application server installation here.

To install PHP-SDK:

$ composer require temporal/sdk

Read how to configure your worker and init workflows here.

Testing

To test integration make sure to install Golang and PHP 7.4+ at the same host. Composer is required to manage the extension.

$ make install-dependencies
$ make start-docker-compose
$ make test

License

MIT License

Documentation

Index

Constants

View Source
const (
	// PluginName defines public service name.
	PluginName string = "temporal"

	// RrMode env variable key
	RrMode string = "RR_MODE"

	// RrCodec env variable key
	RrCodec string = "RR_CODEC"

	// RrCodecVal - codec name, should be in sync with the PHP-SDK
	RrCodecVal string = "protobuf"
)
View Source
const (
	MetricsTypeSummary string = "summary"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config added in v1.1.0

type Config struct {
	Address    string       `mapstructure:"address"`
	Namespace  string       `mapstructure:"namespace"`
	Metrics    *Metrics     `mapstructure:"metrics"`
	Activities *pool.Config `mapstructure:"activities"`
	CacheSize  int          `mapstructure:"cache_size"`
}

Config of the temporal client and dependent services.

func (*Config) InitDefault added in v1.1.0

func (c *Config) InitDefault()

type Metrics added in v1.1.0

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

type Plugin added in v1.1.0

type Plugin struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Plugin) Init added in v1.1.0

func (p *Plugin) Init(cfg config.Configurer, log *zap.Logger, server server.Server) error

func (*Plugin) Name added in v1.1.0

func (p *Plugin) Name() string

func (*Plugin) RPC added in v1.1.0

func (p *Plugin) RPC() interface{}

func (*Plugin) Reset added in v1.1.0

func (p *Plugin) Reset() error

func (*Plugin) SedID added in v1.1.0

func (p *Plugin) SedID() uint64

func (*Plugin) Serve added in v1.1.0

func (p *Plugin) Serve() chan error

func (*Plugin) Stop added in v1.1.0

func (p *Plugin) Stop() error

func (*Plugin) Workers added in v1.1.0

func (p *Plugin) Workers() []*process.State

type RecordHeartbeatRequest added in v1.1.0

type RecordHeartbeatRequest struct {
	TaskToken []byte `json:"taskToken"`
	Details   []byte `json:"details"`
}

RecordHeartbeatRequest sent by activity to record current state.

type RecordHeartbeatResponse added in v1.1.0

type RecordHeartbeatResponse struct {
	Canceled bool `json:"canceled"`
}

RecordHeartbeatResponse sent back to the worker to indicate that activity was canceled.

Directories

Path Synopsis
proto

Jump to

Keyboard shortcuts

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