Documentation ¶
Overview ¶
Package nats provides config and flags for connecting to NATS.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Servers []string Name string Username string Password string PasswordFile string Store string Credentials CredsConfig TLSConfig *tls.Config }
Config is the configuration for the NATS connection.
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns the default configuration for the NATS connection.
type CredsConfig ¶
CredsConfig represents NATS credentials.
func (CredsConfig) Load ¶
func (f CredsConfig) Load(_ context.Context, fileReader FileReader) (nats.Option, error)
Load loads the NATS credentials. If fileReader is nil, this uses ioutil.ReadFile.
type FileReader ¶
FileReader reads a file and returns its bytes.
Click to show internal directories.
Click to hide internal directories.