Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // The default client Default = New() // The default server list Servers = []string{"http://127.0.0.1:8081"} // The default number of retries Retries = 1 )
Functions ¶
Types ¶
type Client ¶
type Client interface { Close() error Publish(topic string, payload []byte) error Subscribe(topic string) (<-chan []byte, error) Unsubscribe(<-chan []byte) error }
Client is the interface provided by this package
type Option ¶
type Option func(o *Options)
func WithResolver ¶
WithResolver sets the resolver used to get the server list
func WithSelector ¶
WithSelector sets the server selector used by the client
func WithServers ¶
WithServers sets the servers used by the client
Click to show internal directories.
Click to hide internal directories.