Documentation ¶
Overview ¶
Package mqtt5 provides a communication protocol binding implementation using the MQTT v5 pub-sub messaging protocol.
Index ¶
- type Mqtt5Binding
- func (b *Mqtt5Binding) ClientId() string
- func (b *Mqtt5Binding) Close() (done <-chan struct{})
- func (b *Mqtt5Binding) Open(cfg *config.Config, timeout time.Duration) <-chan error
- func (b *Mqtt5Binding) PublishAction(ctx context.Context, action api.Action, scope ...api.Scope) (results <-chan api.ActionResult, err error)
- func (b *Mqtt5Binding) PublishEvent(event api.Event, scope ...api.Scope) error
- func (b *Mqtt5Binding) PublishQuery(ctx context.Context, query api.Query, scope ...api.Scope) (results <-chan api.QueryResult, err error)
- func (b *Mqtt5Binding) SubscribeAction(ctx context.Context, filter api.SubscriptionFilter) (actions <-chan api.ActionWithCallback, err error)
- func (b *Mqtt5Binding) SubscribeEvent(ctx context.Context, filter api.SubscriptionFilter) (events <-chan api.Event, err error)
- func (b *Mqtt5Binding) SubscribeQuery(ctx context.Context, filter api.SubscriptionFilter) (queries <-chan api.QueryWithCallback, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mqtt5Binding ¶
type Mqtt5Binding struct {
// contains filtered or unexported fields
}
Mqtt5Binding realizes a communication protocol binding for MQTT v5 by implementing the communication API interface api.Api.
func (*Mqtt5Binding) ClientId ¶
func (b *Mqtt5Binding) ClientId() string
ClientId returns the MQTT client ID used to connect to the broker (exposed for testing purposes).
func (*Mqtt5Binding) Close ¶
func (b *Mqtt5Binding) Close() (done <-chan struct{})
Close implements the api.Api interface.
func (*Mqtt5Binding) PublishAction ¶
func (b *Mqtt5Binding) PublishAction(ctx context.Context, action api.Action, scope ...api.Scope) (results <-chan api.ActionResult, err error)
PublishAction implements the api.Api interface.
func (*Mqtt5Binding) PublishEvent ¶
PublishEvent implements the api.Api interface.
func (*Mqtt5Binding) PublishQuery ¶
func (b *Mqtt5Binding) PublishQuery(ctx context.Context, query api.Query, scope ...api.Scope) (results <-chan api.QueryResult, err error)
PublishQuery implements the api.Api interface.
func (*Mqtt5Binding) SubscribeAction ¶
func (b *Mqtt5Binding) SubscribeAction(ctx context.Context, filter api.SubscriptionFilter) (actions <-chan api.ActionWithCallback, err error)
SubscribeAction implements the api.Api interface.
func (*Mqtt5Binding) SubscribeEvent ¶
func (b *Mqtt5Binding) SubscribeEvent(ctx context.Context, filter api.SubscriptionFilter) (events <-chan api.Event, err error)
SubscribeEvent implements the api.Api interface.
func (*Mqtt5Binding) SubscribeQuery ¶
func (b *Mqtt5Binding) SubscribeQuery(ctx context.Context, filter api.SubscriptionFilter) (queries <-chan api.QueryWithCallback, err error)
SubscribeQuery implements the api.Api interface.