activity

package
v1.0.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

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

	// Main plugin name
	RootPluginName = "temporal"

	// RRMode sets as RR_MODE env variable to let worker know about the mode to run.
	RRMode = "temporal/activity"
)
View Source
const RR_CODEC = "RR_CODEC" //nolint:golint,stylecheck

RR_CODEC env variable

View Source
const RR_MODE = "RR_MODE" //nolint:golint,stylecheck

RR_MODE env variable

Variables

This section is empty.

Functions

This section is empty.

Types

type Plugin

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

Plugin to manage activity execution.

func (*Plugin) ActivityNames

func (p *Plugin) ActivityNames() []string

ActivityNames returns list of all available activities.

func (*Plugin) AddListener

func (p *Plugin) AddListener(listener events.Listener)

AddListener adds event listeners to the service.

func (*Plugin) Init

func (p *Plugin) Init(temporal client.Temporal, server server.Server, log logger.Logger, cfg config.Configurer) error

Init configures activity service.

func (*Plugin) Name

func (p *Plugin) Name() string

Name of the service.

func (*Plugin) RPC

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

RPC returns associated rpc service.

func (*Plugin) Reset

func (p *Plugin) Reset() error

Reset resets underlying workflow pool with new copy.

func (*Plugin) Serve

func (p *Plugin) Serve() chan error

Serve activities with underlying workers.

func (*Plugin) Stop

func (p *Plugin) Stop() error

Stop stops the serving plugin.

func (*Plugin) Workers

func (p *Plugin) Workers() []worker.BaseProcess

Workers returns pool workers.

type RecordHeartbeatRequest

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

RecordHeartbeatRequest sent by activity to record current state.

type RecordHeartbeatResponse

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

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

Jump to

Keyboard shortcuts

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