temporalclient

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: AGPL-3.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package temporalclient builds a Temporal SDK client configured via the envconfig package, with two extensions on top:

  • file:// API keys: when the resolved API key has the form "file:///absolute/path", the path is read on every RPC via client.NewAPIKeyDynamicCredentials, so external rotators that update the file in place are picked up without a process restart.
  • Startup health check: Dial verifies the gRPC connection to the frontend before returning. The underlying client.Dial is lazy and would otherwise return a healthy-looking client even when the server is unreachable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dial

func Dial(ctx context.Context, reg prometheus.Registerer) (client.Client, func(), error)

Dial loads Temporal client options via envconfig, expands a file:// API key into dynamic credentials when present, verifies the gRPC connection via CheckHealth, and bridges Temporal SDK metrics onto reg so they appear on the same /metrics endpoint as application metrics. Pass nil for reg to disable SDK metrics entirely.

The returned shutdown function must be deferred by the caller. It flushes pending SDK metric samples, stops the tally reporter goroutine, and closes the Temporal client. It is safe to call more than once. When Dial returns a non-nil error the shutdown is a no-op so callers can `defer shutdown()` unconditionally.

Types

This section is empty.

Jump to

Keyboard shortcuts

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