优化结构
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -195,8 +196,8 @@ func validateCommunicationIntegrationConfig(kind, provider string, values map[st
|
||||
return errors.New("rabbitmq port 必须在 1-65535 之间")
|
||||
}
|
||||
exchangeType := strings.ToLower(integrationText(values, "exchange_type"))
|
||||
if exchangeType != "direct" && exchangeType != "fanout" && exchangeType != "topic" && exchangeType != "headers" {
|
||||
return errors.New("rabbitmq exchange_type 必须是 direct、fanout、topic 或 headers")
|
||||
if exchangeType != "direct" && exchangeType != "fanout" && exchangeType != "topic" {
|
||||
return errors.New("rabbitmq exchange_type 必须是 direct、fanout 或 topic")
|
||||
}
|
||||
if integrationInt64(values, "prefetch_count", -1) < 0 {
|
||||
return errors.New("rabbitmq prefetch_count 不能小于 0")
|
||||
|
||||
Reference in New Issue
Block a user