Versions in this module Expand all Collapse all v5 v5.0.5 Jun 11, 2025 v5.0.4 Nov 14, 2024 Changes in this version + var ErrEmptyBrokerAddress = errors.New("broker address is empty") + var ErrMissingAPIToken = errors.New("api token has not been set") + var ErrMissingCollectionID = errors.New("collection ID has not been set") + var ErrTimeout = errors.New("timed out") + func ContextWithAuth(token string) context.Context + func ContextWithAuthAndTimeout(token string, timeout time.Duration) (context.Context, func()) + type DataStream interface + Close func() error + Recv func() (spanapi.OutputDataMessage, error) + func NewCollectionDataStream(ctx context.Context, config *spanapi.Configuration, collectionID string) (DataStream, error) + func NewDeviceDataStream(ctx context.Context, config *spanapi.Configuration, ...) (DataStream, error) + func NewMQTTStream(options ...MQTTOption) (DataStream, error) + type MQTTOption func(opt *mqttParam) *mqttParam + func WithAPIToken(token string) MQTTOption + func WithBrokerOverride(broker string) MQTTOption + func WithClientID(id string) MQTTOption + func WithCollectionID(collectionID string) MQTTOption Other modules containing this package github.com/lab5e/go-spanapi/v4