Documentation ¶
Index ¶
- Constants
- type ConnectControl
- func (cc *ConnectControl) Close()
- func (cc *ConnectControl) DefaultSpec() interface{}
- func (cc *ConnectControl) Description() string
- func (cc *ConnectControl) HandleMQTT(ctx context.MQTTContext) *context.MQTTResult
- func (cc *ConnectControl) Inherit(filterSpec *pipeline.FilterSpec, previousGeneration pipeline.Filter)
- func (cc *ConnectControl) Init(filterSpec *pipeline.FilterSpec)
- func (cc *ConnectControl) Kind() string
- func (cc *ConnectControl) Results() []string
- func (cc *ConnectControl) Status() interface{}
- type Spec
- type Status
Constants ¶
const (
// Kind is the kind of ConnectControl
Kind = "ConnectControl"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectControl ¶
type ConnectControl struct {
// contains filtered or unexported fields
}
ConnectControl is used to control MQTT clients connect status, if MQTTContext ClientID in bannedClients, the connection will be closed, if MQTTContext publish topic in bannedTopics, the connection will be closed.
func (*ConnectControl) Close ¶
func (cc *ConnectControl) Close()
Close close ConnectControl gracefully
func (*ConnectControl) DefaultSpec ¶
func (cc *ConnectControl) DefaultSpec() interface{}
DefaultSpec return default spec of ConnectControl
func (*ConnectControl) Description ¶
func (cc *ConnectControl) Description() string
Description return description of ConnectControl
func (*ConnectControl) HandleMQTT ¶
func (cc *ConnectControl) HandleMQTT(ctx context.MQTTContext) *context.MQTTResult
HandleMQTT handle MQTT request
func (*ConnectControl) Inherit ¶
func (cc *ConnectControl) Inherit(filterSpec *pipeline.FilterSpec, previousGeneration pipeline.Filter)
Inherit init ConnectControl with previous generation
func (*ConnectControl) Init ¶
func (cc *ConnectControl) Init(filterSpec *pipeline.FilterSpec)
Init init ConnectControl with pipeline filter spec
func (*ConnectControl) Kind ¶
func (cc *ConnectControl) Kind() string
Kind return kind of ConnectControl
func (*ConnectControl) Results ¶
func (cc *ConnectControl) Results() []string
Results return results of ConnectControl
func (*ConnectControl) Status ¶
func (cc *ConnectControl) Status() interface{}
Status return status of ConnectControl
type Spec ¶
type Spec struct { BannedClientRe string `yaml:"bannedClientRe" jsonschema:"omitempty"` BannedClients []string `yaml:"bannedClients" jsonschema:"omitempty"` BannedTopicRe string `yaml:"bannedTopicRe" jsonschema:"omitempty"` BannedTopics []string `yaml:"bannedTopics" jsonschema:"omitempty"` EarlyStop bool `yaml:"earlyStop" jsonschema:"omitempty"` }
Spec describes the ConnectControl
type Status ¶
type Status struct { BannedClientRe string `yaml:"bannedClientRe" jsonschema:"omitempty"` BannedClientNum int `yaml:"bannedClientNum" jsonschema:"omitempty"` BannedTopicRe string `yaml:"bannedTopicRe" jsonschema:"omitempty"` BannedTopicNum int `yaml:"bannedTopicNum" jsonschema:"omitempty"` }
Status is ConnectControl filter status