Documentation
¶
Index ¶
- Constants
- func ConfigAdd(path string)
- func NewConn(ctx context.Context, plugins ...Plugin) (*nats.Conn, error)
- func NewConnWithConfigPath(ctx context.Context, path string) (*nats.Conn, error)
- func NewConnWithOptions(ctx context.Context, options *Options, plugins ...Plugin) (*nats.Conn, error)
- type Options
- type Plugin
Constants ¶
View Source
const (
PluginsRoot = root + ".plugins"
)
Variables ¶
This section is empty.
Functions ¶
func NewConnWithConfigPath ¶
NewConnWithConfigPath returns a new nats connection with options from config path.
Types ¶
type Options ¶
type Options struct {
Url string
MaxReconnects int
ReconnectWait time.Duration
ReconnectJitter time.Duration
ReconnectJitterTLS time.Duration
Timeout time.Duration
PingInterval time.Duration
MaxPingOut int
MaxChanLen int
ReconnectBufSize int
DrainTimeout time.Duration
Verbose bool
Compression bool
RetryOnFailedConnect bool
}
Options nats connection options.
func NewOptions ¶
NewOptions returns options from config file or environment vars.
func NewOptionsWithPath ¶
NewOptionsWithPath unmarshals a given key path into options and returns it.
Click to show internal directories.
Click to hide internal directories.