-
Notifications
You must be signed in to change notification settings - Fork 325
/
sink_config.go
67 lines (57 loc) · 4.04 KB
/
sink_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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package utils
type SinkConfig struct {
TopicsPattern *string `json:"topicsPattern,omitempty" yaml:"topicsPattern"`
Resources *Resources `json:"resources,omitempty" yaml:"resources"`
TimeoutMs *int64 `json:"timeoutMs,omitempty" yaml:"timeoutMs"`
// Whether the subscriptions the functions created/used should be deleted when the functions is deleted
CleanupSubscription bool `json:"cleanupSubscription" yaml:"cleanupSubscription"`
RetainOrdering bool `json:"retainOrdering" yaml:"retainOrdering"`
RetainKeyOrdering bool `json:"retainKeyOrdering" yaml:"retainKeyOrdering"`
AutoAck bool `json:"autoAck" yaml:"autoAck"`
Parallelism int `json:"parallelism,omitempty" yaml:"parallelism"`
Tenant string `json:"tenant,omitempty" yaml:"tenant"`
Namespace string `json:"namespace,omitempty" yaml:"namespace"`
Name string `json:"name,omitempty" yaml:"name"`
ClassName string `json:"className,omitempty" yaml:"className"`
SinkType string `json:"sinkType,omitempty" yaml:"sinkType"`
Archive string `json:"archive,omitempty" yaml:"archive"`
ProcessingGuarantees string `json:"processingGuarantees,omitempty" yaml:"processingGuarantees"`
SourceSubscriptionName string `json:"sourceSubscriptionName,omitempty" yaml:"sourceSubscriptionName"`
SourceSubscriptionPosition string `json:"sourceSubscriptionPosition,omitempty" yaml:"sourceSubscriptionPosition"`
RuntimeFlags string `json:"runtimeFlags,omitempty" yaml:"runtimeFlags"`
Inputs []string `json:"inputs,omitempty" yaml:"inputs"`
TopicToSerdeClassName map[string]string `json:"topicToSerdeClassName,omitempty" yaml:"topicToSerdeClassName"`
TopicToSchemaType map[string]string `json:"topicToSchemaType,omitempty" yaml:"topicToSchemaType"`
InputSpecs map[string]ConsumerConfig `json:"inputSpecs,omitempty" yaml:"inputSpecs"`
Configs map[string]interface{} `json:"configs,omitempty" yaml:"configs"`
TopicToSchemaProperties map[string]string `json:"topicToSchemaProperties,omitempty" yaml:"topicToSchemaProperties"`
CustomRuntimeOptions string `json:"customRuntimeOptions,omitempty" yaml:"customRuntimeOptions"`
// This is a map of secretName(aka how the secret is going to be
// accessed in the function via context) to an object that
// encapsulates how the secret is fetched by the underlying
// secrets provider. The type of an value here can be found by the
// SecretProviderConfigurator.getSecretObjectType() method.
Secrets map[string]interface{} `json:"secrets,omitempty" yaml:"secrets"`
MaxMessageRetries int `json:"maxMessageRetries,omitempty" yaml:"maxMessageRetries"`
DeadLetterTopic string `json:"deadLetterTopic,omitempty" yaml:"deadLetterTopic"`
NegativeAckRedeliveryDelayMs int64 `json:"negativeAckRedeliveryDelayMs,omitempty" yaml:"negativeAckRedeliveryDelayMs"`
TransformFunction string `json:"transformFunction,omitempty" yaml:"transformFunction"`
TransformFunctionClassName string `json:"transformFunctionClassName,omitempty" yaml:"transformFunctionClassName"`
TransformFunctionConfig string `json:"transformFunctionConfig,omitempty" yaml:"transformFunctionConfig"`
}