conf

package
v0.0.0-...-c46d5a2 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const LEVEL_SEPARATOR = "/"
View Source
const LOCALHOST = "127.0.0.1"
View Source
const MAX_TOPIC_SINGLE_SUBSCRIBE = 10

client can't subscribe more than N topics on a single "subscribe" command

View Source
const MAX_WAIT_FOR_ACK = 4
View Source
const MINIMUM_SUPPORTED_PROTOCOL = 4
View Source
const MQTT_V3_11 = 4
View Source
const MQTT_V5 = 5
View Source
const QOS0 = 0
View Source
const QOS1 = 1
View Source
const QOS2 = 2
View Source
const ROUTER_MODE_DEBUG = "debug"

"debug" act as "standard" but also dump all published messages to debug file, use SELECTED_CLIENTS to dump only some clients traffic

View Source
const ROUTER_MODE_SIMPLE = "simple"

"simple" stripped down router, match only fulltext topics, ignores pounds and pluses special chars

View Source
const ROUTER_MODE_STANDARD = "standard"

Router modes: "standard" router acts as standard mqtt router

View Source
const SUB_TOPIC_FILTER_INVALID = 143

SUBSCRIBE REASON CODE

View Source
const SUCCESS = 0

GENERIC REASON CODE

View Source
const TOPIC_SHARED = "$share"
View Source
const UNSUB_NO_SUB_EXISTED = 17

UNSUBSCRIBE REASON CODE

View Source
const UNSUB_UNSPECIFIED_ERROR = 128
View Source
const WILDCARD_MULTI_LEVEL = "#"
View Source
const WILDCARD_SINGLE_LEVEL = "+"

Variables

View Source
var ACL_ON bool = true
View Source
var API_PORT string = ":8080"

TCP port for http API

View Source
var API_TOKEN_HOURS_DURATION int = 1
View Source
var API_TOKEN_ISSUER string = "TagYou"
View Source
var API_TOKEN_SIGNING_KEY []byte = []byte("generic_non_acceptable_key_2023")
View Source
var CLEAN_EXPIRED_RETRIES bool = true

(qos > 0) stop retries (wait for) for messages pub_ack pub_rec pub_rel pub_comp

View Source
var CLEAN_EXPIRED_RETRIES_INTERVAL int = 60

(minutes) interval at which check for expired retries cleanup (can be heavy on db, don't be too aggressive)

View Source
var CLEAN_EXPIRED_SESSIONS bool = true

clean expired sessions async (client_id never that never reconnects)

View Source
var CLEAN_EXPIRED_SESSIONS_INTERVAL int = 60

(minutes) interval at which check for expired sessions cleanup (can be heavy on db, don't be too aggressive)

View Source
var DB_NAME = "sqlite.db3"

db name for sqlite single file, ignored on badger

View Source
var DB_PATH = "."

full or relative dir where db files will reside

View Source
var DEBUG_CLIENTS = ""

list of selected clientId to debug traffic separated by slash "/" "client1/client2", empty string dump all traffic

View Source
var DEBUG_FILE string = "traffic.debug"

with router mode "debug": use this file to write traffic

View Source
var DEFAULT_KEEPALIVE int = 30

(secs) keepalive for tcp connections before mqtt connect

View Source
var FORBID_ANONYMOUS_LOGIN bool = true
View Source
var INIT_ADMIN_PASSWORD []byte = []byte("")
View Source
var INIT_DB = false

remove and

View Source
var LISTEN_PORT string = ":1883"

TCP port for mqtt binary connections

View Source
var PASSWORD_MIN_LENGTH int = 8
View Source
var RETRY_EXPIRATION int = 60

(secs) consider retry expired after RETRY_EXPIRATION secs

current router mode (can be overridden by env var)

View Source
var ROUTER_STARTING_CAPACITY = 10000

initial capacity of router (affects memory and performance at startup) affects only simple router and standard router

View Source
var SESSION_MAX_DURATION_SECONDS uint32 = 3600

(secs) session can't last more than

View Source
var WS_PORT string = ":1080"

TCP port for mqtt websocket connections

Functions

func Loader

func Loader()

Types

This section is empty.

Jump to

Keyboard shortcuts

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