wind-c / comqtt

A lightweight, high-performance go mqtt server(v3.0|v3.1.1|v5.0) supporting distributed cluster
MIT License
869 stars 50 forks source link

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

Closed gioxiao closed 7 months ago

gioxiao commented 7 months ago

`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下一级配置没有正确加载。