Documentation
¶
Overview ¶
Package natsconf helps configure NATS connections from a JSON/YAML configuration source.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Name string `json:"name"` // Optional client name for the connection URL string `json:"url"` MaxReconnects int `json:"max_reconnects"` // default -1 ReconnectWait int `json:"reconnect_wait"` // default 1000 (ms) Creds string `json:"creds"` // NKey with JWT credentials file TLS struct { ServerName string `json:"server_name"` Cert string `json:"cert"` Key string `json:"key"` CA string `json:"ca"` } `json:"tls"` }
Config defines how to connect to the NATS servers.
func (*Config) CertificateOption ¶
CertificateOption generates a nats.Option for the configured TLS certificates.
Click to show internal directories.
Click to hide internal directories.