activity

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PluginName defines public service name.
	PluginName = "activities"
)
View Source
const RR_CODEC = "RR_CODEC" //nolint:revive,stylecheck

RR_CODEC env variable

View Source
const RR_MODE = "RR_MODE" //nolint:revive,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) BaseProcesses added in v1.0.4

func (p *Plugin) BaseProcesses() []rrWorker.BaseProcess

BaseProcesses returns pool workers.

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() []*process.State

Workers returns workers process state

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 canceled.

Jump to

Keyboard shortcuts

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