whippet

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(ctx context.Context, config Config, logger *slog.Logger) (*paho.Client, chan *paho.Publish, error)

func Request

func Request(ctx context.Context, client *paho.Client, config Config, payload []byte, msgCh chan *paho.Publish, logger *slog.Logger) ([]byte, error)

Types

type Config

type Config struct {
	Server      string
	PublishTo   string
	SubscribeTo string
	Qos         int
	Retained    bool
	ClientID    string
	Username    string
	Password    string
	Timeout     time.Duration
}

func GetConfig

func GetConfig(args []string) (Config, bool, error)

Jump to

Keyboard shortcuts

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