Thanks to visit codestin.com
Credit goes to github.com

Skip to content

mqtt.options配置加载不正确 #78

@gioxiao

Description

@gioxiao

`type Options struct {
// Capabilities defines the server features and behaviour. If you only wish to modify
// several of these values, set them explicitly - e.g.
// server.Options.Capabilities.MaximumClientWritesPending = 16 * 1024
Capabilities *Capabilities

// ClientNetWriteBufferSize specifies the size of the client *bufio.Writer write buffer.
ClientNetWriteBufferSize int

// ClientNetReadBufferSize specifies the size of the client *bufio.Reader read buffer.
ClientNetReadBufferSize int

// Logger specifies a custom configured implementation of zerolog to override
// the servers default logger configuration. If you wish to change the log level,
// of the default logger, you can do so by setting
// 	server := mqtt.New(nil)
// level := new(slog.LevelVar)
// server.Slog = slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{
// 	Level: level,
// }))
// level.Set(slog.LevelDebug)
Logger *slog.Logger

// SysTopicResendInterval specifies the interval between $SYS topic updates in seconds.
SysTopicResendInterval int64

// Enable Inline client to allow direct subscribing and publishing from the parent codebase,
// with negligible performance difference (disabled by default to prevent confusion in statistics).
InlineClient bool

}`

配置的结构体没有加上yaml的配置,导致conf.yaml的mqtt.options下一级配置没有正确加载。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions