优化结构
This commit is contained in:
@@ -233,6 +233,9 @@ func validateCommunicationIntegrationConfig(kind, provider string, values map[st
|
||||
if timeout := integrationInt64(values, "connect_timeout", 0); timeout <= 0 {
|
||||
return errors.New("emqx connect_timeout 必须大于 0")
|
||||
}
|
||||
if interval := integrationInt64(values, "reconnect_interval", 0); interval <= 0 {
|
||||
return errors.New("emqx reconnect_interval 必须大于 0")
|
||||
}
|
||||
case IntegrationKindMQ + "/rabbitmq":
|
||||
port := integrationInt64(values, "port", 0)
|
||||
if port < 1 || port > 65535 {
|
||||
@@ -251,6 +254,9 @@ func validateCommunicationIntegrationConfig(kind, provider string, values map[st
|
||||
if integrationInt64(values, "connect_timeout", 0) <= 0 {
|
||||
return errors.New("rabbitmq connect_timeout 必须大于 0")
|
||||
}
|
||||
if integrationInt64(values, "reconnect_interval", 0) <= 0 {
|
||||
return errors.New("rabbitmq reconnect_interval 必须大于 0")
|
||||
}
|
||||
case IntegrationKindWebSocket + "/melody":
|
||||
path := integrationText(values, "path")
|
||||
if !strings.HasPrefix(path, "/") {
|
||||
|
||||
Reference in New Issue
Block a user