temporal

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 7 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 temporal builds options for connecting to a Temporal frontend.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientOptions

func ClientOptions(
	address, namespace string,
	token func(ctx context.Context) (string, error),
	opts ...Option,
) client.Options

ClientOptions returns options for a client of namespace on the frontend at address, or client.DefaultHostPort if address is empty, for use with client.Dial or client.NewLazyClient.

Each request carries a bearer token from token, such as one from the oidc package's ClientCredentials.TokenFunc. A nil token sends no credentials.

The connection is plaintext unless WithTLS is given, even with a token, which would otherwise turn TLS on.

Without WithLogger, it logs through the default logger as it is when ClientOptions is called, with a component=temporal attribute.

Types

type Option

type Option func(*clientOptions)

Option configures ClientOptions.

func WithDialer

func WithDialer(dial func(ctx context.Context, network, address string) (net.Conn, error)) Option

WithDialer opens connections to the frontend with dial, such as a tsnet server's Dial, rather than resolving and dialling the address directly.

func WithLogger

func WithLogger(logger *slog.Logger) Option

WithLogger logs through logger as given, adding no attributes.

func WithTLS

func WithTLS(config *tls.Config) Option

WithTLS connects over TLS configured by config. A nil config uses the defaults, verifying the frontend against the system's root certificates.

Jump to

Keyboard shortcuts

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