@@ -12,7 +12,7 @@ import (
12
12
"github.com/Jeffail/benthos/v3/lib/types"
13
13
"github.com/Jeffail/benthos/v3/lib/util/config"
14
14
"github.com/Jeffail/benthos/v3/lib/x/docs"
15
- yaml "gopkg.in/yaml.v3"
15
+ "gopkg.in/yaml.v3"
16
16
)
17
17
18
18
//------------------------------------------------------------------------------
@@ -91,6 +91,7 @@ const (
91
91
TypeSTDOUT = "stdout"
92
92
TypeSwitch = "switch"
93
93
TypeSyncResponse = "sync_response"
94
+ TypeTableStorage = "table_storage"
94
95
TypeTCP = "tcp"
95
96
TypeTry = "try"
96
97
TypeUDP = "udp"
@@ -103,53 +104,54 @@ const (
103
104
104
105
// Config is the all encompassing configuration struct for all output types.
105
106
type Config struct {
106
- Type string `json:"type" yaml:"type"`
107
- AMQP writer.AMQPConfig `json:"amqp" yaml:"amqp"`
108
- AMQP09 writer.AMQPConfig `json:"amqp_0_9" yaml:"amqp_0_9"`
109
- AMQP1 writer.AMQP1Config `json:"amqp_1" yaml:"amqp_1"`
110
- BlobStorage writer.AzureBlobStorageConfig `json:"blob_storage" yaml:"blob_storage"`
111
- Broker BrokerConfig `json:"broker" yaml:"broker"`
112
- Cache writer.CacheConfig `json:"cache" yaml:"cache"`
113
- Drop writer.DropConfig `json:"drop" yaml:"drop"`
114
- DropOnError DropOnErrorConfig `json:"drop_on_error" yaml:"drop_on_error"`
115
- Dynamic DynamicConfig `json:"dynamic" yaml:"dynamic"`
116
- DynamoDB writer.DynamoDBConfig `json:"dynamodb" yaml:"dynamodb"`
117
- Elasticsearch writer.ElasticsearchConfig `json:"elasticsearch" yaml:"elasticsearch"`
118
- File FileConfig `json:"file" yaml:"file"`
119
- Files writer.FilesConfig `json:"files" yaml:"files"`
120
- GCPPubSub writer.GCPPubSubConfig `json:"gcp_pubsub" yaml:"gcp_pubsub"`
121
- HDFS writer.HDFSConfig `json:"hdfs" yaml:"hdfs"`
122
- HTTPClient writer.HTTPClientConfig `json:"http_client" yaml:"http_client"`
123
- HTTPServer HTTPServerConfig `json:"http_server" yaml:"http_server"`
124
- Inproc InprocConfig `json:"inproc" yaml:"inproc"`
125
- Kafka writer.KafkaConfig `json:"kafka" yaml:"kafka"`
126
- Kinesis writer.KinesisConfig `json:"kinesis" yaml:"kinesis"`
127
- KinesisFirehose writer.KinesisFirehoseConfig `json:"kinesis_firehose" yaml:"kinesis_firehose"`
128
- MQTT writer.MQTTConfig `json:"mqtt" yaml:"mqtt"`
129
- Nanomsg writer.NanomsgConfig `json:"nanomsg" yaml:"nanomsg"`
130
- NATS writer.NATSConfig `json:"nats" yaml:"nats"`
131
- NATSStream writer.NATSStreamConfig `json:"nats_stream" yaml:"nats_stream"`
132
- NSQ writer.NSQConfig `json:"nsq" yaml:"nsq"`
133
- Plugin interface {} `json:"plugin,omitempty" yaml:"plugin,omitempty"`
134
- RedisHash writer.RedisHashConfig `json:"redis_hash" yaml:"redis_hash"`
135
- RedisList writer.RedisListConfig `json:"redis_list" yaml:"redis_list"`
136
- RedisPubSub writer.RedisPubSubConfig `json:"redis_pubsub" yaml:"redis_pubsub"`
137
- RedisStreams writer.RedisStreamsConfig `json:"redis_streams" yaml:"redis_streams"`
138
- Resource string `json:"resource" yaml:"resource"`
139
- Retry RetryConfig `json:"retry" yaml:"retry"`
140
- S3 writer.AmazonS3Config `json:"s3" yaml:"s3"`
141
- SNS writer.SNSConfig `json:"sns" yaml:"sns"`
142
- SQS writer.AmazonSQSConfig `json:"sqs" yaml:"sqs"`
143
- STDOUT STDOUTConfig `json:"stdout" yaml:"stdout"`
144
- Switch SwitchConfig `json:"switch" yaml:"switch"`
145
- SyncResponse struct {} `json:"sync_response" yaml:"sync_response"`
146
- TCP writer.TCPConfig `json:"tcp" yaml:"tcp"`
147
- Try TryConfig `json:"try" yaml:"try"`
148
- UDP writer.UDPConfig `json:"udp" yaml:"udp"`
149
- Socket writer.SocketConfig `json:"socket" yaml:"socket"`
150
- Websocket writer.WebsocketConfig `json:"websocket" yaml:"websocket"`
151
- ZMQ4 * writer.ZMQ4Config `json:"zmq4,omitempty" yaml:"zmq4,omitempty"`
152
- Processors []processor.Config `json:"processors" yaml:"processors"`
107
+ Type string `json:"type" yaml:"type"`
108
+ AMQP writer.AMQPConfig `json:"amqp" yaml:"amqp"`
109
+ AMQP09 writer.AMQPConfig `json:"amqp_0_9" yaml:"amqp_0_9"`
110
+ AMQP1 writer.AMQP1Config `json:"amqp_1" yaml:"amqp_1"`
111
+ BlobStorage writer.AzureBlobStorageConfig `json:"blob_storage" yaml:"blob_storage"`
112
+ Broker BrokerConfig `json:"broker" yaml:"broker"`
113
+ Cache writer.CacheConfig `json:"cache" yaml:"cache"`
114
+ Drop writer.DropConfig `json:"drop" yaml:"drop"`
115
+ DropOnError DropOnErrorConfig `json:"drop_on_error" yaml:"drop_on_error"`
116
+ Dynamic DynamicConfig `json:"dynamic" yaml:"dynamic"`
117
+ DynamoDB writer.DynamoDBConfig `json:"dynamodb" yaml:"dynamodb"`
118
+ Elasticsearch writer.ElasticsearchConfig `json:"elasticsearch" yaml:"elasticsearch"`
119
+ File FileConfig `json:"file" yaml:"file"`
120
+ Files writer.FilesConfig `json:"files" yaml:"files"`
121
+ GCPPubSub writer.GCPPubSubConfig `json:"gcp_pubsub" yaml:"gcp_pubsub"`
122
+ HDFS writer.HDFSConfig `json:"hdfs" yaml:"hdfs"`
123
+ HTTPClient writer.HTTPClientConfig `json:"http_client" yaml:"http_client"`
124
+ HTTPServer HTTPServerConfig `json:"http_server" yaml:"http_server"`
125
+ Inproc InprocConfig `json:"inproc" yaml:"inproc"`
126
+ Kafka writer.KafkaConfig `json:"kafka" yaml:"kafka"`
127
+ Kinesis writer.KinesisConfig `json:"kinesis" yaml:"kinesis"`
128
+ KinesisFirehose writer.KinesisFirehoseConfig `json:"kinesis_firehose" yaml:"kinesis_firehose"`
129
+ MQTT writer.MQTTConfig `json:"mqtt" yaml:"mqtt"`
130
+ Nanomsg writer.NanomsgConfig `json:"nanomsg" yaml:"nanomsg"`
131
+ NATS writer.NATSConfig `json:"nats" yaml:"nats"`
132
+ NATSStream writer.NATSStreamConfig `json:"nats_stream" yaml:"nats_stream"`
133
+ NSQ writer.NSQConfig `json:"nsq" yaml:"nsq"`
134
+ Plugin interface {} `json:"plugin,omitempty" yaml:"plugin,omitempty"`
135
+ RedisHash writer.RedisHashConfig `json:"redis_hash" yaml:"redis_hash"`
136
+ RedisList writer.RedisListConfig `json:"redis_list" yaml:"redis_list"`
137
+ RedisPubSub writer.RedisPubSubConfig `json:"redis_pubsub" yaml:"redis_pubsub"`
138
+ RedisStreams writer.RedisStreamsConfig `json:"redis_streams" yaml:"redis_streams"`
139
+ Resource string `json:"resource" yaml:"resource"`
140
+ Retry RetryConfig `json:"retry" yaml:"retry"`
141
+ S3 writer.AmazonS3Config `json:"s3" yaml:"s3"`
142
+ SNS writer.SNSConfig `json:"sns" yaml:"sns"`
143
+ SQS writer.AmazonSQSConfig `json:"sqs" yaml:"sqs"`
144
+ STDOUT STDOUTConfig `json:"stdout" yaml:"stdout"`
145
+ Switch SwitchConfig `json:"switch" yaml:"switch"`
146
+ SyncResponse struct {} `json:"sync_response" yaml:"sync_response"`
147
+ TableStorage writer.AzureTableStorageConfig `json:"table_storage" yaml:"table_storage"`
148
+ TCP writer.TCPConfig `json:"tcp" yaml:"tcp"`
149
+ Try TryConfig `json:"try" yaml:"try"`
150
+ UDP writer.UDPConfig `json:"udp" yaml:"udp"`
151
+ Socket writer.SocketConfig `json:"socket" yaml:"socket"`
152
+ Websocket writer.WebsocketConfig `json:"websocket" yaml:"websocket"`
153
+ ZMQ4 * writer.ZMQ4Config `json:"zmq4,omitempty" yaml:"zmq4,omitempty"`
154
+ Processors []processor.Config `json:"processors" yaml:"processors"`
153
155
}
154
156
155
157
// NewConfig returns a configuration struct fully populated with default values.
@@ -195,6 +197,7 @@ func NewConfig() Config {
195
197
STDOUT : NewSTDOUTConfig (),
196
198
Switch : NewSwitchConfig (),
197
199
SyncResponse : struct {}{},
200
+ TableStorage : writer .NewAzureTableStorageConfig (),
198
201
TCP : writer .NewTCPConfig (),
199
202
Try : NewTryConfig (),
200
203
UDP : writer .NewUDPConfig (),
0 commit comments