forked from VolantMQ/volantmq
/
config.go
31 lines (26 loc) · 808 Bytes
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package topicsTypes
import (
"github.com/VolantMQ/vlapi/mqttp"
"github.com/VolantMQ/vlapi/plugin/persistence"
"github.com/VolantMQ/volantmq/systree"
)
// ProviderConfig interface implemented by every backend
type ProviderConfig interface{}
// MemConfig of topics manager
type MemConfig struct {
Stat systree.TopicsStat
Persist persistence.Retained
OnCleanUnsubscribe func([]string)
Name string
MaxQos mqttp.QosType
OverlappingSubscriptions bool
}
// NewMemConfig generate default config for memory
func NewMemConfig() *MemConfig {
return &MemConfig{
Name: "mem",
MaxQos: mqttp.QoS2,
OnCleanUnsubscribe: func([]string) {},
OverlappingSubscriptions: false,
}
}