temporal

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package temporal initializes a Temporal worker that provides activities and workflows wrapping the APIs of various third-party services which are defined and implemented under the pkg/api and pkg/listeners packages.

Index

Constants

View Source
const (
	DefaultTaskQueue = "timpani"
)

Variables

View Source
var ForbiddenSignalNameChars = regexp.MustCompile("[^0-9A-Za-z_.]")

Functions

func Flags

func Flags(configFilePath altsrc.StringSourcer) []cli.Flag

Flags defines CLI flags to configure a Temporal worker. These flags are usually set using environment variables or the application's configuration file.

func Run

func Run(l zerolog.Logger, cmd *cli.Command) error

Run initializes the Temporal worker, and blocks to keep it running.

func Signal

func Signal(ctx context.Context, cfg listeners.TemporalConfig, name string, payload map[string]any) error

Signal sends a specific payload, which was received as an asynchronous event notification, to all (zero of more) Temporal workflows that are waiting for it.

The ctx parameter is expected to have a ZeroLog logger attached to it:

ctx = l.WithContext(ctx)

Types

type LogAdapter

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

LogAdapter implements Temporal's Logger interface.

func (LogAdapter) Debug

func (a LogAdapter) Debug(msg string, keyvals ...any)

func (LogAdapter) Error

func (a LogAdapter) Error(msg string, keyvals ...any)

func (LogAdapter) Info

func (a LogAdapter) Info(msg string, keyvals ...any)

func (LogAdapter) Warn

func (a LogAdapter) Warn(msg string, keyvals ...any)

Jump to

Keyboard shortcuts

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