internal

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// ClientName specifies the name of the client, which is used in logs and metadata to identify the client for
	// debugging purposes.
	ClientName string `env:"nats_client_name"`

	// URL specifies the NATS client URL used to connect to the NATS server.  This is used if Conn is nil, which is
	// the case if `llm.New("nats")` is used to create the client.  This defaults to `nats://localhost:4222`.
	URL string `env:"nats_url"`

	// NKeyFile provides the path to an nkey seed / secret file that will be used to authenticate with the NATS server.
	// Ignored if a NATS connection is provided.
	NKeyFile string `env:"nats_nk"`

	// CA provides the path to a file containing trusted certificates for verifying the NATS server.  Ignored if a
	// NATS connection is provided.  If not provided, the host certificate authorities will be used.
	CA string `env:"nats_ca"`
}

func Defaults

func Defaults() Options

func (*Options) Dial

func (opts *Options) Dial(more ...nats.Option) (*nats.Conn, error)

Dial will connect to the NATS server using the options provided.

Jump to

Keyboard shortcuts

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