pubDev

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompareMsg

type CompareMsg func(payload []byte) bool

type NatsClient

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

func (*NatsClient) PublishToDev

func (n *NatsClient) PublishToDev(ctx context.Context, respMsg *deviceMsg.PublishMsg) error

func (*NatsClient) ReqToDeviceSync

func (n *NatsClient) ReqToDeviceSync(ctx context.Context, reqMsg *deviceMsg.PublishMsg, timeout time.Duration, compareMsg CompareMsg) (
	payload []byte, err error)

func (*NatsClient) ReqToDeviceSync2

func (n *NatsClient) ReqToDeviceSync2(ctx context.Context, reqMsg *deviceMsg.PublishMsg, compareMsg CompareMsg) ([]byte, error)

type PubDev

type PubDev interface {
	PublishToDev(ctx context.Context, msg *deviceMsg.PublishMsg) error
	ReqToDeviceSync(ctx context.Context, reqMsg *deviceMsg.PublishMsg, timeout time.Duration, compareMsg CompareMsg) ([]byte, error)
}

func NewPubDev

func NewPubDev(fast *eventBus.FastEvent) (PubDev, error)

Jump to

Keyboard shortcuts

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