Documentation ¶
Index ¶
- Variables
- type BrokerOptions
- type Option
- func (Option) Default() option.Setting[BrokerOptions]
- func (Option) FastAddresses(addrs ...string) option.Setting[BrokerOptions]
- func (Option) FastAuth(username, password string) option.Setting[BrokerOptions]
- func (Option) NatsClient(cli *nats.Conn) option.Setting[BrokerOptions]
- func (Option) QueuePrefix(prefix string) option.Setting[BrokerOptions]
- func (Option) TopicPrefix(prefix string) option.Setting[BrokerOptions]
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Install = plugin.Install Uninstall = plugin.Uninstall )
Functions ¶
This section is empty.
Types ¶
type BrokerOptions ¶
type BrokerOptions struct { NatsClient *nats.Conn TopicPrefix string QueuePrefix string FastAddresses []string FastUsername string FastPassword string }
BrokerOptions is a struct that holds various configuration options for the NATS broker.
type Option ¶
type Option struct{}
Option is a struct used for setting options.
func (Option) Default ¶
func (Option) Default() option.Setting[BrokerOptions]
Default sets default values for BrokerOptions.
func (Option) FastAddresses ¶
func (Option) FastAddresses(addrs ...string) option.Setting[BrokerOptions]
FastAddresses sets the addresses in BrokerOptions. If NatsClient is nil, these addresses are used as the connection addresses.
func (Option) FastAuth ¶
func (Option) FastAuth(username, password string) option.Setting[BrokerOptions]
FastAuth sets the authentication credentials in BrokerOptions. If NatsClient is nil, these credentials are used for authentication.
func (Option) NatsClient ¶
func (Option) NatsClient(cli *nats.Conn) option.Setting[BrokerOptions]
NatsClient sets the NATS client in BrokerOptions.
func (Option) QueuePrefix ¶
func (Option) QueuePrefix(prefix string) option.Setting[BrokerOptions]
QueuePrefix sets the queue prefix in BrokerOptions.
func (Option) TopicPrefix ¶
func (Option) TopicPrefix(prefix string) option.Setting[BrokerOptions]
TopicPrefix sets the topic prefix in BrokerOptions.
Click to show internal directories.
Click to hide internal directories.