config

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ServerURL *url.URL // MQTT server URL
	Auth      *authConf
	Group     string
	ClientID  string   // Client ID to use when connecting to server
	Topics    []string // Topic on which to publish messaged
	Qos       byte     // QOS to use when publishing

	KeepAlive         uint16        // seconds between keepalive packets
	ConnectRetryDelay time.Duration // Period between connection attempts

	QueuePath string

	Debug bool // autopaho and paho debug output requested

	Logger *log.Logger
}

config holds the configuration

func GetConfigFromEnv added in v1.2.0

func GetConfigFromEnv() (*Config, error)

getConfig - Retrieves the configuration from the environment

func GetConfigFromEnvWithoutTopic added in v1.2.0

func GetConfigFromEnvWithoutTopic() (*Config, error)

func (*Config) AddTopics added in v1.2.4

func (c *Config) AddTopics(topics ...string)

func (*Config) IsRawdata

func (c *Config) IsRawdata() bool

func (*Config) SetAuth

func (c *Config) SetAuth(user string, pass []byte)

Jump to

Keyboard shortcuts

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