c8ysubscribe

package
v2.38.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Subscribe

func Subscribe(client *c8y.Client, log *logger.Logger, channelPattern string, opts Options) (err error)

Subscribe subscribe to a single channel

func SubscribeMultiple

func SubscribeMultiple(client *c8y.Client, log *logger.Logger, channelPatterns []string, opts Options) (err error)

SubscribeMultiple subscribe to multiple channels

Types

type Options

type Options struct {
	// Timeout duration
	Timeout time.Duration

	// MaxMessages maximum messages
	MaxMessages int64

	// ActionTypes filter by action types
	ActionTypes []string

	// OnMessage on message callback
	OnMessage func(msg string) error
}

Options subscription options

Jump to

Keyboard shortcuts

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