Documentation
¶
Index ¶
- func MqttBrokerFromContext(ctx context.Context) (*confmqtt.Broker, bool)
- func MustMqttBrokerFromContext(ctx context.Context) *confmqtt.Broker
- func WithChannels(ctx context.Context, v []*Channel) context.Context
- func WithChannelsContext(v []*Channel) contextx.WithContext
- func WithMqttBroker(ctx context.Context, v *confmqtt.Broker) context.Context
- func WithMqttBrokerContext(v *confmqtt.Broker) contextx.WithContext
- type Channel
- type CtxChannels
- type CtxMqttBroker
- type Publisher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MqttBrokerFromContext ¶
func WithChannelsContext ¶
func WithChannelsContext(v []*Channel) contextx.WithContext
func WithMqttBrokerContext ¶
func WithMqttBrokerContext(v *confmqtt.Broker) contextx.WithContext
Types ¶
type Channel ¶
type Channel struct {
Publisher `env:""`
Topic string `env:""`
EventType string `env:""`
PubInterval time.Duration `env:""`
}
func MustChannelsFromContext ¶
func (*Channel) SetDefault ¶
func (c *Channel) SetDefault()
func (*Channel) StartPublish ¶
type CtxChannels ¶
type CtxChannels struct{}
type CtxMqttBroker ¶
type CtxMqttBroker struct{}
Click to show internal directories.
Click to hide internal directories.