sessioncalls

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Adapted from https://github.com/dynajoe/temporal-terraform-demo/blob/main/heartbeat/heartbeat.go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeginHeartbeat

func BeginHeartbeat(ctx context.Context, interval time.Duration) (context.Context, func())

Types

type CallOpts added in v0.3.2

type CallOpts struct {
	Catch   bool          `json:"catch"`
	Timeout time.Duration `json:"timeout"`
}

type CallParams

type CallParams struct {
	SessionID sdktypes.SessionID
	CallSpec  sdktypes.SessionCallSpec

	Executors *sdkexecutor.Executors // needed for session specific calls (global modules, script functions).
}

type Calls

type Calls interface {
	StartWorkers(context.Context) error
	Call(ctx workflow.Context, params *CallParams) (sdktypes.SessionCallAttemptResult, error)
}

func New

func New(l *zap.Logger, config Config, svcs *sessionsvcs.Svcs) Calls

type Config

type Config struct {
	// common
	Worker temporalclient.WorkerConfig `koanf:"worker"`

	// override above
	GeneralWorker temporalclient.WorkerConfig `koanf:"general_worker"`
	UniqueWorker  temporalclient.WorkerConfig `koanf:"unique_worker"`

	Activity       temporalclient.ActivityConfig `koanf:"activity"`
	UniqueActivity temporalclient.ActivityConfig `koanf:"unique_activity"`

	ActivityHeartbeatInterval time.Duration `koanf:"activity_heartbeat_interval"`
}

Jump to

Keyboard shortcuts

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