Remove deprecated mqtrigger with kind fission (#2875)
* Remove deprecated mqtrigger with kind fission * Remove unused deps --------- Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
@@ -80,10 +80,6 @@ const (
|
||||
PodInfoMount = "/etc/podinfo"
|
||||
)
|
||||
|
||||
const (
|
||||
MessageQueueTypeKafka = "kafka"
|
||||
)
|
||||
|
||||
const (
|
||||
// FunctionReferenceFunctionName means that the function
|
||||
// reference is simply by function name.
|
||||
|
||||
@@ -751,7 +751,7 @@ type (
|
||||
// +optional
|
||||
FunctionReference FunctionReference `json:"functionref"`
|
||||
|
||||
// Type of message queue (NATS, Kafka, AzureQueue)
|
||||
// Type of message queue
|
||||
// +optional
|
||||
MessageQueueType MessageQueueType `json:"messageQueueType"`
|
||||
|
||||
|
||||
@@ -523,11 +523,11 @@ func (spec MessageQueueTriggerSpec) Validate() error {
|
||||
if !validator.IsValidMessageQueue((string)(spec.MessageQueueType), spec.MqtKind) {
|
||||
result = multierror.Append(result, MakeValidationErr(ErrorUnsupportedType, "MessageQueueTriggerSpec.MessageQueueType", spec.MessageQueueType, "not a supported message queue type"))
|
||||
} else {
|
||||
if !validator.IsValidTopic((string)(spec.MessageQueueType), spec.Topic, spec.MqtKind) {
|
||||
if !validator.IsValidTopic(spec.MqtKind) {
|
||||
result = multierror.Append(result, MakeValidationErr(ErrorInvalidValue, "MessageQueueTriggerSpec.Topic", spec.Topic, "not a valid topic"))
|
||||
}
|
||||
|
||||
if len(spec.ResponseTopic) > 0 && !validator.IsValidTopic((string)(spec.MessageQueueType), spec.ResponseTopic, spec.MqtKind) {
|
||||
if len(spec.ResponseTopic) > 0 && !validator.IsValidTopic(spec.MqtKind) {
|
||||
result = multierror.Append(result, MakeValidationErr(ErrorInvalidValue, "MessageQueueTriggerSpec.ResponseTopic", spec.ResponseTopic, "not a valid topic"))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,7 +312,7 @@ func (MessageQueueTriggerList) SwaggerDoc() map[string]string {
|
||||
var map_MessageQueueTriggerSpec = map[string]string{
|
||||
"": "MessageQueueTriggerSpec defines a binding from a topic in a message queue to a function.",
|
||||
"functionref": "The reference to a function for message queue trigger to invoke with when receiving messages from subscribed topic.",
|
||||
"messageQueueType": "Type of message queue (NATS, Kafka, AzureQueue)",
|
||||
"messageQueueType": "Type of message queue",
|
||||
"topic": "Subscribed topic",
|
||||
"respTopic": "Topic for message queue trigger to sent response from function.",
|
||||
"errorTopic": "Topic to collect error response sent from function",
|
||||
|
||||
Reference in New Issue
Block a user