mqtt

package module
v2.5.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MQTTAttacker

type MQTTAttacker interface {
	Role() string
	ultron.Attacker
}

type MQTTAttackerOption

type MQTTAttackerOption func(MQTTAttacker)

func WithMQTTClientPool added in v2.5.2

func WithMQTTClientPool(p MQTTClientPool) MQTTAttackerOption

func WithMessageHandler

func WithMessageHandler(handler mqtt.MessageHandler) MQTTAttackerOption

func WithPayloadGenerator added in v2.5.2

func WithPayloadGenerator(fn func(context.Context) interface{}) MQTTAttackerOption

func WithQOS

func WithQOS(qos byte) MQTTAttackerOption

func WithRetained

func WithRetained(retained bool) MQTTAttackerOption

func WithTopicSelector added in v2.5.2

func WithTopicSelector(fn TopicSelector) MQTTAttackerOption

type MQTTClientPool added in v2.5.2

type MQTTClientPool interface {
	Get() (mqtt.Client, error)
	Put(mqtt.Client)
}

func NewDynamicClientPool added in v2.5.2

func NewDynamicClientPool(opts *mqtt.ClientOptions) MQTTClientPool

func NewFixedNumberClientPool added in v2.5.2

func NewFixedNumberClientPool(num int, opts *mqtt.ClientOptions) MQTTClientPool

func NewSingleClientPool added in v2.5.2

func NewSingleClientPool(opt *mqtt.ClientOptions) MQTTClientPool

type MQTTPublishers added in v2.5.2

type MQTTPublishers struct {
	// contains filtered or unexported fields
}

func NewMQTTPublishers added in v2.5.2

func NewMQTTPublishers(name string, opts ...MQTTAttackerOption) *MQTTPublishers

func (*MQTTPublishers) Apply added in v2.5.2

func (pub *MQTTPublishers) Apply(opts ...MQTTAttackerOption)

func (*MQTTPublishers) Fire added in v2.5.2

func (pub *MQTTPublishers) Fire(ctx context.Context) error

func (*MQTTPublishers) Name added in v2.5.2

func (pub *MQTTPublishers) Name() string

func (*MQTTPublishers) Role added in v2.5.2

func (pub *MQTTPublishers) Role() string

type MQTTSubscribers added in v2.5.2

type MQTTSubscribers struct {
	// contains filtered or unexported fields
}

func NewMQTTSubscribers added in v2.5.2

func NewMQTTSubscribers(name string, opts ...MQTTAttackerOption) *MQTTSubscribers

func (*MQTTSubscribers) Apply added in v2.5.2

func (sub *MQTTSubscribers) Apply(opts ...MQTTAttackerOption)

func (*MQTTSubscribers) Fire added in v2.5.2

func (sub *MQTTSubscribers) Fire(ctx context.Context) error

func (*MQTTSubscribers) Name added in v2.5.2

func (sub *MQTTSubscribers) Name() string

func (*MQTTSubscribers) Role added in v2.5.2

func (sub *MQTTSubscribers) Role() string

type PayloadGenerator added in v2.5.2

type PayloadGenerator func(context.Context) interface{}

type TopicSelector added in v2.5.2

type TopicSelector func(mqtt.Client) string

func RoundTripTopics added in v2.5.2

func RoundTripTopics(topics ...string) TopicSelector

func SingleTopic added in v2.5.2

func SingleTopic(name string) TopicSelector

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL