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 ¶
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 ¶
WithLogger logs through logger as given, adding no attributes.