Documentation
¶
Index ¶
- Constants
- type Server
- type ServerOption
- func Subscribe(ctx context.Context, topic string, h broker.Handler, ...) ServerOption
- func WithAddress(addrs []string) ServerOption
- func WithAuth(username string, password string) ServerOption
- func WithCleanSession(enable bool) ServerOption
- func WithClientId(clientId string) ServerOption
- func WithLogger(logger log.Logger) ServerOption
- func WithTLSConfig(c *tls.Config) ServerOption
- type SubscribeOption
- type SubscribeOptionMap
- type SubscriberMap
- type Transport
Constants ¶
View Source
const (
KindMQTT transport.Kind = "mqtt"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
func NewServer ¶
func NewServer(opts ...ServerOption) *Server
func (*Server) RegisterSubscriber ¶
type ServerOption ¶
type ServerOption func(o *Server)
func Subscribe ¶
func Subscribe(ctx context.Context, topic string, h broker.Handler, opts ...broker.SubscribeOption) ServerOption
func WithAddress ¶
func WithAddress(addrs []string) ServerOption
func WithAuth ¶
func WithAuth(username string, password string) ServerOption
func WithCleanSession ¶
func WithCleanSession(enable bool) ServerOption
func WithClientId ¶
func WithClientId(clientId string) ServerOption
func WithLogger ¶
func WithLogger(logger log.Logger) ServerOption
func WithTLSConfig ¶
func WithTLSConfig(c *tls.Config) ServerOption
type SubscribeOption ¶
type SubscribeOption struct {
// contains filtered or unexported fields
}
type SubscribeOptionMap ¶
type SubscribeOptionMap map[string]*SubscribeOption
type SubscriberMap ¶
type SubscriberMap map[string]broker.Subscriber
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport is a MQTT transport.
func (*Transport) ReplyHeader ¶
ReplyHeader returns the reply header.
func (*Transport) RequestHeader ¶
RequestHeader returns the request header.
func (*Transport) SelectFilters ¶
SelectFilters returns the client select filters.
Click to show internal directories.
Click to hide internal directories.