rpc

package module
v1.0.1 Latest Latest
Warning

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

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

README

paho-mqtt-rpc

Paho MQTT v5 RPC extension. forked from https://github.com/eclipse/paho.golang/tree/master/paho/extensions/rpc and added some features:

  • Request timeout

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRequestTimeout = errors.New("request timeout")
)

Functions

This section is empty.

Types

type Handler

type Handler struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Handler is the struct providing a request/response functionality for the paho MQTT v5 client

func NewHandler

func NewHandler(ctx context.Context, in HandlerInput) (*Handler, error)

func (*Handler) Request

func (h *Handler) Request(ctx context.Context, pb *paho.Publish) (*paho.Publish, error)

type HandlerInput

type HandlerInput struct {
	Server         string
	Username       *string
	Password       *string
	RequestTimeout time.Duration
}

Jump to

Keyboard shortcuts

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