sessioncalls

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 20 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
	Debug         bool
	ForceInternal bool
	CallSpec      sdktypes.SessionCallSpec

	Poller    sdktypes.Value         // TODO: need to be in Call.
	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(z *zap.Logger, config Config, svcs *sessionsvcs.Svcs) Calls

type Config

type Config struct {
	Temporal TemporalConfig `koanf:"temporal"`
}

type TemporalConfig

type TemporalConfig struct {
	ActivityHeartbeatInterval      time.Duration `koanf:"activity_heartbeat_interval"`
	ActivityHeartbeatTimeout       time.Duration `koanf:"activity_heartbeat_timeout"`
	ActivityScheduleToCloseTimeout time.Duration `koanf:"activity_schedule_to_close_timeout"`
	ActivityStartToCloseTimeout    time.Duration `koanf:"activity_start_to_close_timeout"`
	LocalScheduleToCloseTimeout    time.Duration `koanf:"local_schedule_to_close_timeout"`

	// This is used only for activities that are scheduled
	// on unique workers.
	ActivityScheduleToStartTimeout time.Duration `koanf:"activity_schedule_to_start_timeout"`

	Worker worker.Options
}

Jump to

Keyboard shortcuts

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