Documentation ¶
Overview ¶
Package writer defines implementations of an interface for generic message writing that outputs to various third party sinks.
Index ¶
- type AMQP
- func (a *AMQP) CloseAsync()
- func (a *AMQP) Connect() error
- func (a *AMQP) ConnectWithContext(ctx context.Context) error
- func (a *AMQP) WaitForClose(timeout time.Duration) error
- func (a *AMQP) Write(msg types.Message) error
- func (a *AMQP) WriteWithContext(ctx context.Context, msg types.Message) error
- type AMQPConfig
- type AMQPExchangeDeclareConfig
- type AmazonS3
- func (a *AmazonS3) CloseAsync()
- func (a *AmazonS3) Connect() error
- func (a *AmazonS3) ConnectWithContext(ctx context.Context) error
- func (a *AmazonS3) WaitForClose(time.Duration) error
- func (a *AmazonS3) Write(msg types.Message) error
- func (a *AmazonS3) WriteWithContext(wctx context.Context, msg types.Message) error
- type AmazonS3Config
- type AmazonSQS
- func (a *AmazonSQS) CloseAsync()
- func (a *AmazonSQS) Connect() error
- func (a *AmazonSQS) ConnectWithContext(ctx context.Context) error
- func (a *AmazonSQS) WaitForClose(time.Duration) error
- func (a *AmazonSQS) Write(msg types.Message) error
- func (a *AmazonSQS) WriteWithContext(ctx context.Context, msg types.Message) error
- type AmazonSQSConfig
- type Cache
- type CacheConfig
- type Drop
- type DropConfig
- type DynamoDB
- func (d *DynamoDB) CloseAsync()
- func (d *DynamoDB) Connect() error
- func (d *DynamoDB) ConnectWithContext(ctx context.Context) error
- func (d *DynamoDB) WaitForClose(time.Duration) error
- func (d *DynamoDB) Write(msg types.Message) error
- func (d *DynamoDB) WriteWithContext(ctx context.Context, msg types.Message) error
- type DynamoDBConfig
- type Elasticsearch
- func (e *Elasticsearch) CloseAsync()
- func (e *Elasticsearch) Connect() error
- func (e *Elasticsearch) ConnectWithContext(ctx context.Context) error
- func (e *Elasticsearch) WaitForClose(timeout time.Duration) error
- func (e *Elasticsearch) Write(msg types.Message) error
- func (e *Elasticsearch) WriteWithContext(ctx context.Context, msg types.Message) error
- type ElasticsearchConfig
- type Files
- type FilesConfig
- type GCPPubSub
- func (c *GCPPubSub) CloseAsync()
- func (c *GCPPubSub) Connect() error
- func (c *GCPPubSub) ConnectWithContext(ctx context.Context) error
- func (c *GCPPubSub) WaitForClose(time.Duration) error
- func (c *GCPPubSub) Write(msg types.Message) error
- func (c *GCPPubSub) WriteWithContext(ctx context.Context, msg types.Message) error
- type GCPPubSubConfig
- type HDFS
- type HDFSConfig
- type HTTPClient
- func (h *HTTPClient) CloseAsync()
- func (h *HTTPClient) Connect() error
- func (h *HTTPClient) ConnectWithContext(ctx context.Context) error
- func (h *HTTPClient) WaitForClose(timeout time.Duration) error
- func (h *HTTPClient) Write(msg types.Message) error
- func (h *HTTPClient) WriteWithContext(ctx context.Context, msg types.Message) error
- type HTTPClientConfig
- type Kafka
- func (k *Kafka) CloseAsync()
- func (k *Kafka) Connect() error
- func (k *Kafka) ConnectWithContext(ctx context.Context) error
- func (k *Kafka) WaitForClose(timeout time.Duration) error
- func (k *Kafka) Write(msg types.Message) error
- func (k *Kafka) WriteWithContext(ctx context.Context, msg types.Message) error
- type KafkaConfig
- type Kinesis
- func (a *Kinesis) CloseAsync()
- func (a *Kinesis) Connect() error
- func (a *Kinesis) ConnectWithContext(ctx context.Context) error
- func (a *Kinesis) WaitForClose(time.Duration) error
- func (a *Kinesis) Write(msg types.Message) error
- func (a *Kinesis) WriteWithContext(ctx context.Context, msg types.Message) error
- type KinesisConfig
- type KinesisFirehose
- func (a *KinesisFirehose) CloseAsync()
- func (a *KinesisFirehose) Connect() error
- func (a *KinesisFirehose) ConnectWithContext(ctx context.Context) error
- func (a *KinesisFirehose) WaitForClose(time.Duration) error
- func (a *KinesisFirehose) Write(msg types.Message) error
- func (a *KinesisFirehose) WriteWithContext(ctx context.Context, msg types.Message) error
- type KinesisFirehoseConfig
- type MQTT
- func (m *MQTT) CloseAsync()
- func (m *MQTT) Connect() error
- func (m *MQTT) ConnectWithContext(ctx context.Context) error
- func (m *MQTT) WaitForClose(timeout time.Duration) error
- func (m *MQTT) Write(msg types.Message) error
- func (m *MQTT) WriteWithContext(ctx context.Context, msg types.Message) error
- type MQTTConfig
- type NATS
- func (n *NATS) CloseAsync()
- func (n *NATS) Connect() error
- func (n *NATS) ConnectWithContext(ctx context.Context) error
- func (n *NATS) WaitForClose(timeout time.Duration) error
- func (n *NATS) Write(msg types.Message) error
- func (n *NATS) WriteWithContext(ctx context.Context, msg types.Message) error
- type NATSConfig
- type NATSStream
- func (n *NATSStream) CloseAsync()
- func (n *NATSStream) Connect() error
- func (n *NATSStream) ConnectWithContext(ctx context.Context) error
- func (n *NATSStream) WaitForClose(timeout time.Duration) error
- func (n *NATSStream) Write(msg types.Message) error
- func (n *NATSStream) WriteWithContext(ctx context.Context, msg types.Message) error
- type NATSStreamConfig
- type NSQ
- type NSQConfig
- type Nanomsg
- func (s *Nanomsg) CloseAsync()
- func (s *Nanomsg) Connect() error
- func (s *Nanomsg) ConnectWithContext(ctx context.Context) error
- func (s *Nanomsg) WaitForClose(timeout time.Duration) error
- func (s *Nanomsg) Write(msg types.Message) error
- func (s *Nanomsg) WriteWithContext(ctx context.Context, msg types.Message) error
- type NanomsgConfig
- type OptionalAWSConfig
- type RedisHash
- func (r *RedisHash) CloseAsync()
- func (r *RedisHash) Connect() error
- func (r *RedisHash) ConnectWithContext(ctx context.Context) error
- func (r *RedisHash) WaitForClose(timeout time.Duration) error
- func (r *RedisHash) Write(msg types.Message) error
- func (r *RedisHash) WriteWithContext(ctx context.Context, msg types.Message) error
- type RedisHashConfig
- type RedisList
- func (r *RedisList) CloseAsync()
- func (r *RedisList) Connect() error
- func (r *RedisList) ConnectWithContext(ctx context.Context) error
- func (r *RedisList) WaitForClose(timeout time.Duration) error
- func (r *RedisList) Write(msg types.Message) error
- func (r *RedisList) WriteWithContext(ctx context.Context, msg types.Message) error
- type RedisListConfig
- type RedisPubSub
- func (r *RedisPubSub) CloseAsync()
- func (r *RedisPubSub) Connect() error
- func (r *RedisPubSub) ConnectWithContext(ctx context.Context) error
- func (r *RedisPubSub) WaitForClose(timeout time.Duration) error
- func (r *RedisPubSub) Write(msg types.Message) error
- func (r *RedisPubSub) WriteWithContext(ctx context.Context, msg types.Message) error
- type RedisPubSubConfig
- type RedisStreams
- func (r *RedisStreams) CloseAsync()
- func (r *RedisStreams) Connect() error
- func (r *RedisStreams) ConnectWithContext(ctx context.Context) error
- func (r *RedisStreams) WaitForClose(timeout time.Duration) error
- func (r *RedisStreams) Write(msg types.Message) error
- func (r *RedisStreams) WriteWithContext(ctx context.Context, msg types.Message) error
- type RedisStreamsConfig
- type SNS
- type SNSConfig
- type Socket
- type SocketConfig
- type TCP
- type TCPConfig
- type Type
- type UDP
- type UDPConfig
- type Websocket
- type WebsocketConfig
- type ZMQ4Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AMQP ¶
type AMQP struct {
// contains filtered or unexported fields
}
AMQP is an output type that serves AMQP messages.
func (*AMQP) CloseAsync ¶
func (a *AMQP) CloseAsync()
CloseAsync shuts down the AMQP output and stops processing messages.
func (*AMQP) ConnectWithContext ¶
ConnectWithContext establishes a connection to an AMQP server.
func (*AMQP) WaitForClose ¶
WaitForClose blocks until the AMQP output has closed down.
type AMQPConfig ¶
type AMQPConfig struct { URL string `json:"url" yaml:"url"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` Exchange string `json:"exchange" yaml:"exchange"` ExchangeDeclare AMQPExchangeDeclareConfig `json:"exchange_declare" yaml:"exchange_declare"` BindingKey string `json:"key" yaml:"key"` Persistent bool `json:"persistent" yaml:"persistent"` Mandatory bool `json:"mandatory" yaml:"mandatory"` Immediate bool `json:"immediate" yaml:"immediate"` TLS btls.Config `json:"tls" yaml:"tls"` }
AMQPConfig contains configuration fields for the AMQP output type.
func NewAMQPConfig ¶
func NewAMQPConfig() AMQPConfig
NewAMQPConfig creates a new AMQPConfig with default values.
type AMQPExchangeDeclareConfig ¶
type AMQPExchangeDeclareConfig struct { Enabled bool `json:"enabled" yaml:"enabled"` Type string `json:"type" yaml:"type"` Durable bool `json:"durable" yaml:"durable"` }
AMQPExchangeDeclareConfig contains fields indicating whether the target AMQP exchange needs to be declared, as well as any fields specifying how to accomplish that.
type AmazonS3 ¶
type AmazonS3 struct {
// contains filtered or unexported fields
}
AmazonS3 is a benthos writer.Type implementation that writes messages to an Amazon S3 bucket.
func NewAmazonS3 ¶
NewAmazonS3 creates a new Amazon S3 bucket writer.Type.
func (*AmazonS3) CloseAsync ¶
func (a *AmazonS3) CloseAsync()
CloseAsync begins cleaning up resources used by this reader asynchronously.
func (*AmazonS3) ConnectWithContext ¶
ConnectWithContext attempts to establish a connection to the target S3 bucket.
func (*AmazonS3) WaitForClose ¶
WaitForClose will block until either the reader is closed or a specified timeout occurs.
type AmazonS3Config ¶
type AmazonS3Config struct { sess.Config `json:",inline" yaml:",inline"` Bucket string `json:"bucket" yaml:"bucket"` ForcePathStyleURLs bool `json:"force_path_style_urls" yaml:"force_path_style_urls"` Path string `json:"path" yaml:"path"` ContentType string `json:"content_type" yaml:"content_type"` ContentEncoding string `json:"content_encoding" yaml:"content_encoding"` StorageClass string `json:"storage_class" yaml:"storage_class"` Timeout string `json:"timeout" yaml:"timeout"` KMSKeyID string `json:"kms_key_id" yaml:"kms_key_id"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` DisableSSL bool `json:"disable_ssl" yaml:"disable_ssl"` InsecureSkipVerify bool `json:"insecure_skip_verify" yaml:"insecure_skip_verify"` }
AmazonS3Config contains configuration fields for the AmazonS3 output type.
func NewAmazonS3Config ¶
func NewAmazonS3Config() AmazonS3Config
NewAmazonS3Config creates a new Config with default values.
type AmazonSQS ¶
type AmazonSQS struct {
// contains filtered or unexported fields
}
AmazonSQS is a benthos writer.Type implementation that writes messages to an Amazon SQS queue.
func NewAmazonSQS ¶
NewAmazonSQS creates a new Amazon SQS writer.Type.
func (*AmazonSQS) CloseAsync ¶
func (a *AmazonSQS) CloseAsync()
CloseAsync begins cleaning up resources used by this reader asynchronously.
func (*AmazonSQS) ConnectWithContext ¶
ConnectWithContext attempts to establish a connection to the target SQS queue.
func (*AmazonSQS) WaitForClose ¶
WaitForClose will block until either the reader is closed or a specified timeout occurs.
type AmazonSQSConfig ¶
type AmazonSQSConfig struct { URL string `json:"url" yaml:"url"` MessageGroupID string `json:"message_group_id" yaml:"message_group_id"` MessageDeduplicationID string `json:"message_deduplication_id" yaml:"message_deduplication_id"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` retries.Config `json:",inline" yaml:",inline"` Batching batch.PolicyConfig `json:"batching" yaml:"batching"` // contains filtered or unexported fields }
AmazonSQSConfig contains configuration fields for the output AmazonSQS type.
func NewAmazonSQSConfig ¶
func NewAmazonSQSConfig() AmazonSQSConfig
NewAmazonSQSConfig creates a new Config with default values.
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache is a benthos writer.Type implementation that writes messages to a Cache directory.
func NewCache ¶
func NewCache( conf CacheConfig, mgr types.Manager, log log.Modular, stats metrics.Type, ) (*Cache, error)
NewCache creates a new Cache writer.Type.
func (*Cache) CloseAsync ¶
func (c *Cache) CloseAsync()
CloseAsync begins cleaning up resources used by this writer asynchronously.
func (*Cache) ConnectWithContext ¶
ConnectWithContext does nothing.
func (*Cache) WaitForClose ¶
WaitForClose will block until either the writer is closed or a specified timeout occurs.
type CacheConfig ¶
type CacheConfig struct { Target string `json:"target" yaml:"target"` Key string `json:"key" yaml:"key"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` }
CacheConfig contains configuration fields for the Cache output type.
func NewCacheConfig ¶
func NewCacheConfig() CacheConfig
NewCacheConfig creates a new Config with default values.
type Drop ¶
type Drop struct {
// contains filtered or unexported fields
}
Drop is a benthos writer.Type implementation that writes message parts to no where.
func (*Drop) CloseAsync ¶
func (d *Drop) CloseAsync()
CloseAsync begins cleaning up resources used by this reader asynchronously.
func (*Drop) WaitForClose ¶
WaitForClose will block until either the reader is closed or a specified timeout occurs.
type DropConfig ¶
type DropConfig struct{}
DropConfig contains configuration fields for the drop output type.
func NewDropConfig ¶
func NewDropConfig() DropConfig
NewDropConfig creates a new DropConfig with default values.
type DynamoDB ¶
type DynamoDB struct {
// contains filtered or unexported fields
}
DynamoDB is a benthos writer.Type implementation that writes messages to an Amazon SQS queue.
func NewDynamoDB ¶
NewDynamoDB creates a new Amazon SQS writer.Type.
func (*DynamoDB) CloseAsync ¶
func (d *DynamoDB) CloseAsync()
CloseAsync begins cleaning up resources used by this writer asynchronously.
func (*DynamoDB) ConnectWithContext ¶
ConnectWithContext attempts to establish a connection to the target DynamoDB table.
func (*DynamoDB) WaitForClose ¶
WaitForClose will block until either the writer is closed or a specified timeout occurs.
type DynamoDBConfig ¶
type DynamoDBConfig struct { Table string `json:"table" yaml:"table"` StringColumns map[string]string `json:"string_columns" yaml:"string_columns"` JSONMapColumns map[string]string `json:"json_map_columns" yaml:"json_map_columns"` TTL string `json:"ttl" yaml:"ttl"` TTLKey string `json:"ttl_key" yaml:"ttl_key"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` retries.Config `json:",inline" yaml:",inline"` Batching batch.PolicyConfig `json:"batching" yaml:"batching"` // contains filtered or unexported fields }
DynamoDBConfig contains config fields for the DynamoDB output type.
func NewDynamoDBConfig ¶
func NewDynamoDBConfig() DynamoDBConfig
NewDynamoDBConfig creates a DynamoDBConfig populated with default values.
type Elasticsearch ¶
type Elasticsearch struct {
// contains filtered or unexported fields
}
Elasticsearch is a writer type that writes messages into elasticsearch.
func NewElasticsearch ¶
func NewElasticsearch(conf ElasticsearchConfig, log log.Modular, stats metrics.Type) (*Elasticsearch, error)
NewElasticsearch creates a new Elasticsearch writer type.
func (*Elasticsearch) CloseAsync ¶
func (e *Elasticsearch) CloseAsync()
CloseAsync shuts down the Elasticsearch writer and stops processing messages.
func (*Elasticsearch) Connect ¶
func (e *Elasticsearch) Connect() error
Connect attempts to establish a connection to a Elasticsearch broker.
func (*Elasticsearch) ConnectWithContext ¶
func (e *Elasticsearch) ConnectWithContext(ctx context.Context) error
ConnectWithContext attempts to establish a connection to a Elasticsearch broker.
func (*Elasticsearch) WaitForClose ¶
func (e *Elasticsearch) WaitForClose(timeout time.Duration) error
WaitForClose blocks until the Elasticsearch writer has closed down.
func (*Elasticsearch) Write ¶
func (e *Elasticsearch) Write(msg types.Message) error
Write will attempt to write a message to Elasticsearch, wait for acknowledgement, and returns an error if applicable.
func (*Elasticsearch) WriteWithContext ¶
WriteWithContext will attempt to write a message to Elasticsearch, wait for acknowledgement, and returns an error if applicable.
type ElasticsearchConfig ¶
type ElasticsearchConfig struct { URLs []string `json:"urls" yaml:"urls"` Sniff bool `json:"sniff" yaml:"sniff"` Healthcheck bool `json:"healthcheck" yaml:"healthcheck"` ID string `json:"id" yaml:"id"` Index string `json:"index" yaml:"index"` Pipeline string `json:"pipeline" yaml:"pipeline"` Type string `json:"type" yaml:"type"` Timeout string `json:"timeout" yaml:"timeout"` Auth auth.BasicAuthConfig `json:"basic_auth" yaml:"basic_auth"` AWS OptionalAWSConfig `json:"aws" yaml:"aws"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` retries.Config `json:",inline" yaml:",inline"` Batching batch.PolicyConfig `json:"batching" yaml:"batching"` }
ElasticsearchConfig contains configuration fields for the Elasticsearch output type.
func NewElasticsearchConfig ¶
func NewElasticsearchConfig() ElasticsearchConfig
NewElasticsearchConfig creates a new ElasticsearchConfig with default values.
type Files ¶
type Files struct {
// contains filtered or unexported fields
}
Files is a benthos writer.Type implementation that writes message parts each to their own file.
func (*Files) CloseAsync ¶
func (f *Files) CloseAsync()
CloseAsync begins cleaning up resources used by this reader asynchronously.
func (*Files) ConnectWithContext ¶
ConnectWithContext is a noop.
func (*Files) WaitForClose ¶
WaitForClose will block until either the reader is closed or a specified timeout occurs.
type FilesConfig ¶
type FilesConfig struct {
Path string `json:"path" yaml:"path"`
}
FilesConfig contains configuration fields for the files output type.
func NewFilesConfig ¶
func NewFilesConfig() FilesConfig
NewFilesConfig creates a new Config with default values.
type GCPPubSub ¶
type GCPPubSub struct {
// contains filtered or unexported fields
}
GCPPubSub is a benthos writer.Type implementation that writes messages to a GCP Pub/Sub topic.
func NewGCPPubSub ¶
NewGCPPubSub creates a new GCP Cloud Pub/Sub writer.Type.
func (*GCPPubSub) CloseAsync ¶
func (c *GCPPubSub) CloseAsync()
CloseAsync begins cleaning up resources used by this reader asynchronously.
func (*GCPPubSub) Connect ¶
Connect attempts to establish a connection to the target GCP Pub/Sub topic.
func (*GCPPubSub) ConnectWithContext ¶
ConnectWithContext attempts to establish a connection to the target GCP Pub/Sub topic.
func (*GCPPubSub) WaitForClose ¶
WaitForClose will block until either the reader is closed or a specified timeout occurs.
type GCPPubSubConfig ¶
type GCPPubSubConfig struct { ProjectID string `json:"project" yaml:"project"` TopicID string `json:"topic" yaml:"topic"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` }
GCPPubSubConfig contains configuration fields for the output GCPPubSub type.
func NewGCPPubSubConfig ¶
func NewGCPPubSubConfig() GCPPubSubConfig
NewGCPPubSubConfig creates a new Config with default values.
type HDFS ¶
type HDFS struct {
// contains filtered or unexported fields
}
HDFS is a benthos writer.Type implementation that writes messages to a HDFS directory.
func (*HDFS) CloseAsync ¶
func (h *HDFS) CloseAsync()
CloseAsync begins cleaning up resources used by this reader asynchronously.
func (*HDFS) ConnectWithContext ¶
ConnectWithContext attempts to establish a connection to the target HDFS host.
func (*HDFS) WaitForClose ¶
WaitForClose will block until either the reader is closed or a specified timeout occurs.
type HDFSConfig ¶
type HDFSConfig struct { Hosts []string `json:"hosts" yaml:"hosts"` User string `json:"user" yaml:"user"` Directory string `json:"directory" yaml:"directory"` Path string `json:"path" yaml:"path"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` }
HDFSConfig contains configuration fields for the HDFS output type.
func NewHDFSConfig ¶
func NewHDFSConfig() HDFSConfig
NewHDFSConfig creates a new Config with default values.
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient is an output type that sends messages as HTTP requests to a target server endpoint.
func NewHTTPClient ¶
func NewHTTPClient( conf HTTPClientConfig, mgr types.Manager, log log.Modular, stats metrics.Type, ) (*HTTPClient, error)
NewHTTPClient creates a new HTTPClient writer type.
func (*HTTPClient) CloseAsync ¶
func (h *HTTPClient) CloseAsync()
CloseAsync shuts down the HTTPClient output and stops processing messages.
func (*HTTPClient) ConnectWithContext ¶
func (h *HTTPClient) ConnectWithContext(ctx context.Context) error
ConnectWithContext does nothing.
func (*HTTPClient) WaitForClose ¶
func (h *HTTPClient) WaitForClose(timeout time.Duration) error
WaitForClose blocks until the HTTPClient output has closed down.
func (*HTTPClient) Write ¶
func (h *HTTPClient) Write(msg types.Message) error
Write attempts to send a message to an HTTP server, this attempt may include retries, and if all retries fail an error is returned.
func (*HTTPClient) WriteWithContext ¶
WriteWithContext attempts to send a message to an HTTP server, this attempt may include retries, and if all retries fail an error is returned.
type HTTPClientConfig ¶
type HTTPClientConfig struct { client.Config `json:",inline" yaml:",inline"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` PropagateResponse bool `json:"propagate_response" yaml:"propagate_response"` Batching batch.PolicyConfig `json:"batching" yaml:"batching"` }
HTTPClientConfig contains configuration fields for the HTTPClient output type.
func NewHTTPClientConfig ¶
func NewHTTPClientConfig() HTTPClientConfig
NewHTTPClientConfig creates a new HTTPClientConfig with default values.
type Kafka ¶
type Kafka struct {
// contains filtered or unexported fields
}
Kafka is a writer type that writes messages into kafka.
func NewKafka ¶
func NewKafka(conf KafkaConfig, mgr types.Manager, log log.Modular, stats metrics.Type) (*Kafka, error)
NewKafka creates a new Kafka writer type.
func (*Kafka) CloseAsync ¶
func (k *Kafka) CloseAsync()
CloseAsync shuts down the Kafka writer and stops processing messages.
func (*Kafka) ConnectWithContext ¶
ConnectWithContext attempts to establish a connection to a Kafka broker.
func (*Kafka) WaitForClose ¶
WaitForClose blocks until the Kafka writer has closed down.
type KafkaConfig ¶
type KafkaConfig struct { Addresses []string `json:"addresses" yaml:"addresses"` ClientID string `json:"client_id" yaml:"client_id"` Key string `json:"key" yaml:"key"` Partitioner string `json:"partitioner" yaml:"partitioner"` Topic string `json:"topic" yaml:"topic"` Compression string `json:"compression" yaml:"compression"` MaxMsgBytes int `json:"max_msg_bytes" yaml:"max_msg_bytes"` Timeout string `json:"timeout" yaml:"timeout"` AckReplicas bool `json:"ack_replicas" yaml:"ack_replicas"` TargetVersion string `json:"target_version" yaml:"target_version"` TLS btls.Config `json:"tls" yaml:"tls"` SASL sasl.Config `json:"sasl" yaml:"sasl"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` retries.Config `json:",inline" yaml:",inline"` Batching batch.PolicyConfig `json:"batching" yaml:"batching"` // TODO: V4 remove this. RoundRobinPartitions bool `json:"round_robin_partitions" yaml:"round_robin_partitions"` }
KafkaConfig contains configuration fields for the Kafka output type.
func NewKafkaConfig ¶
func NewKafkaConfig() KafkaConfig
NewKafkaConfig creates a new KafkaConfig with default values.
type Kinesis ¶
type Kinesis struct {
// contains filtered or unexported fields
}
Kinesis is a benthos writer.Type implementation that writes messages to an Amazon Kinesis stream.
func NewKinesis ¶
NewKinesis creates a new Amazon Kinesis writer.Type.
func (*Kinesis) CloseAsync ¶
func (a *Kinesis) CloseAsync()
CloseAsync begins cleaning up resources used by this reader asynchronously.
func (*Kinesis) Connect ¶
Connect creates a new Kinesis client and ensures that the target Kinesis stream exists.
func (*Kinesis) ConnectWithContext ¶
ConnectWithContext creates a new Kinesis client and ensures that the target Kinesis stream exists.
func (*Kinesis) WaitForClose ¶
WaitForClose will block until either the reader is closed or a specified timeout occurs.
func (*Kinesis) Write ¶
Write attempts to write message contents to a target Kinesis stream in batches of 500. If throttling is detected, failed messages are retried according to the configurable backoff settings.
func (*Kinesis) WriteWithContext ¶
WriteWithContext attempts to write message contents to a target Kinesis stream in batches of 500. If throttling is detected, failed messages are retried according to the configurable backoff settings.
type KinesisConfig ¶
type KinesisConfig struct { Stream string `json:"stream" yaml:"stream"` HashKey string `json:"hash_key" yaml:"hash_key"` PartitionKey string `json:"partition_key" yaml:"partition_key"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` retries.Config `json:",inline" yaml:",inline"` Batching batch.PolicyConfig `json:"batching" yaml:"batching"` // contains filtered or unexported fields }
KinesisConfig contains configuration fields for the Kinesis output type.
func NewKinesisConfig ¶
func NewKinesisConfig() KinesisConfig
NewKinesisConfig creates a new Config with default values.
type KinesisFirehose ¶
type KinesisFirehose struct {
// contains filtered or unexported fields
}
KinesisFirehose is a benthos writer.Type implementation that writes messages to an Amazon Kinesis Firehose destination.
func NewKinesisFirehose ¶
func NewKinesisFirehose( conf KinesisFirehoseConfig, log log.Modular, stats metrics.Type, ) (*KinesisFirehose, error)
NewKinesisFirehose creates a new Amazon Kinesis Firehose writer.Type.
func (*KinesisFirehose) CloseAsync ¶
func (a *KinesisFirehose) CloseAsync()
CloseAsync begins cleaning up resources used by this reader asynchronously.
func (*KinesisFirehose) Connect ¶
func (a *KinesisFirehose) Connect() error
Connect creates a new Kinesis Firehose client and ensures that the target Kinesis Firehose delivery stream.
func (*KinesisFirehose) ConnectWithContext ¶
func (a *KinesisFirehose) ConnectWithContext(ctx context.Context) error
ConnectWithContext creates a new Kinesis Firehose client and ensures that the target Kinesis Firehose delivery stream.
func (*KinesisFirehose) WaitForClose ¶
func (a *KinesisFirehose) WaitForClose(time.Duration) error
WaitForClose will block until either the reader is closed or a specified timeout occurs.
func (*KinesisFirehose) Write ¶
func (a *KinesisFirehose) Write(msg types.Message) error
Write attempts to write message contents to a target Kinesis Firehose delivery stream in batches of 500. If throttling is detected, failed messages are retried according to the configurable backoff settings.
func (*KinesisFirehose) WriteWithContext ¶
WriteWithContext attempts to write message contents to a target Kinesis Firehose delivery stream in batches of 500. If throttling is detected, failed messages are retried according to the configurable backoff settings.
type KinesisFirehoseConfig ¶
type KinesisFirehoseConfig struct { Stream string `json:"stream" yaml:"stream"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` retries.Config `json:",inline" yaml:",inline"` Batching batch.PolicyConfig `json:"batching" yaml:"batching"` // contains filtered or unexported fields }
KinesisFirehoseConfig contains configuration fields for the KinesisFirehose output type.
func NewKinesisFirehoseConfig ¶
func NewKinesisFirehoseConfig() KinesisFirehoseConfig
NewKinesisFirehoseConfig creates a new Config with default values.
type MQTT ¶
type MQTT struct {
// contains filtered or unexported fields
}
MQTT is an output type that serves MQTT messages.
func (*MQTT) CloseAsync ¶
func (m *MQTT) CloseAsync()
CloseAsync shuts down the MQTT output and stops processing messages.
func (*MQTT) ConnectWithContext ¶
ConnectWithContext establishes a connection to an MQTT server.
func (*MQTT) WaitForClose ¶
WaitForClose blocks until the MQTT output has closed down.
type MQTTConfig ¶
type MQTTConfig struct { URLs []string `json:"urls" yaml:"urls"` QoS uint8 `json:"qos" yaml:"qos"` Topic string `json:"topic" yaml:"topic"` ClientID string `json:"client_id" yaml:"client_id"` User string `json:"user" yaml:"user"` Password string `json:"password" yaml:"password"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` }
MQTTConfig contains configuration fields for the MQTT output type.
func NewMQTTConfig ¶
func NewMQTTConfig() MQTTConfig
NewMQTTConfig creates a new MQTTConfig with default values.
type NATS ¶
type NATS struct {
// contains filtered or unexported fields
}
NATS is an output type that serves NATS messages.
func (*NATS) CloseAsync ¶
func (n *NATS) CloseAsync()
CloseAsync shuts down the MQTT output and stops processing messages.
func (*NATS) ConnectWithContext ¶
ConnectWithContext attempts to establish a connection to NATS servers.
func (*NATS) WaitForClose ¶
WaitForClose blocks until the NATS output has closed down.
type NATSConfig ¶
type NATSConfig struct { URLs []string `json:"urls" yaml:"urls"` Subject string `json:"subject" yaml:"subject"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` }
NATSConfig contains configuration fields for the NATS output type.
func NewNATSConfig ¶
func NewNATSConfig() NATSConfig
NewNATSConfig creates a new NATSConfig with default values.
type NATSStream ¶
type NATSStream struct {
// contains filtered or unexported fields
}
NATSStream is an output type that serves NATS messages.
func NewNATSStream ¶
func NewNATSStream(conf NATSStreamConfig, log log.Modular, stats metrics.Type) (*NATSStream, error)
NewNATSStream creates a new NATS Stream output type.
func (*NATSStream) CloseAsync ¶
func (n *NATSStream) CloseAsync()
CloseAsync shuts down the MQTT output and stops processing messages.
func (*NATSStream) Connect ¶
func (n *NATSStream) Connect() error
Connect attempts to establish a connection to NATS servers.
func (*NATSStream) ConnectWithContext ¶
func (n *NATSStream) ConnectWithContext(ctx context.Context) error
ConnectWithContext attempts to establish a connection to NATS servers.
func (*NATSStream) WaitForClose ¶
func (n *NATSStream) WaitForClose(timeout time.Duration) error
WaitForClose blocks until the NATS output has closed down.
func (*NATSStream) Write ¶
func (n *NATSStream) Write(msg types.Message) error
Write attempts to write a message.
func (*NATSStream) WriteWithContext ¶
WriteWithContext attempts to write a message.
type NATSStreamConfig ¶
type NATSStreamConfig struct { URLs []string `json:"urls" yaml:"urls"` ClusterID string `json:"cluster_id" yaml:"cluster_id"` ClientID string `json:"client_id" yaml:"client_id"` Subject string `json:"subject" yaml:"subject"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` }
NATSStreamConfig contains configuration fields for the NATSStream output type.
func NewNATSStreamConfig ¶
func NewNATSStreamConfig() NATSStreamConfig
NewNATSStreamConfig creates a new NATSStreamConfig with default values.
type NSQ ¶
type NSQ struct {
// contains filtered or unexported fields
}
NSQ is an output type that serves NSQ messages.
func (*NSQ) CloseAsync ¶
func (n *NSQ) CloseAsync()
CloseAsync shuts down the NSQ output and stops processing messages.
func (*NSQ) ConnectWithContext ¶
ConnectWithContext attempts to establish a connection to NSQ servers.
func (*NSQ) WaitForClose ¶
WaitForClose blocks until the NSQ output has closed down.
type NSQConfig ¶
type NSQConfig struct { Address string `json:"nsqd_tcp_address" yaml:"nsqd_tcp_address"` Topic string `json:"topic" yaml:"topic"` UserAgent string `json:"user_agent" yaml:"user_agent"` TLS btls.Config `json:"tls" yaml:"tls"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` }
NSQConfig contains configuration fields for the NSQ output type.
func NewNSQConfig ¶
func NewNSQConfig() NSQConfig
NewNSQConfig creates a new NSQConfig with default values.
type Nanomsg ¶
type Nanomsg struct {
// contains filtered or unexported fields
}
Nanomsg is an output type that serves Nanomsg messages.
func NewNanomsg ¶
NewNanomsg creates a new Nanomsg output type.
func (*Nanomsg) CloseAsync ¶
func (s *Nanomsg) CloseAsync()
CloseAsync shuts down the Nanomsg output and stops processing messages.
func (*Nanomsg) ConnectWithContext ¶
ConnectWithContext establishes a connection to a nanomsg socket.
func (*Nanomsg) WaitForClose ¶
WaitForClose blocks until the Nanomsg output has closed down.
type NanomsgConfig ¶
type NanomsgConfig struct { URLs []string `json:"urls" yaml:"urls"` Bind bool `json:"bind" yaml:"bind"` SocketType string `json:"socket_type" yaml:"socket_type"` PollTimeout string `json:"poll_timeout" yaml:"poll_timeout"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` }
NanomsgConfig contains configuration fields for the Nanomsg output type.
func NewNanomsgConfig ¶
func NewNanomsgConfig() NanomsgConfig
NewNanomsgConfig creates a new NanomsgConfig with default values.
type OptionalAWSConfig ¶
type OptionalAWSConfig struct { Enabled bool `json:"enabled" yaml:"enabled"` sess.Config `json:",inline" yaml:",inline"` }
OptionalAWSConfig contains config fields for AWS authentication with an enable flag.
type RedisHash ¶
type RedisHash struct {
// contains filtered or unexported fields
}
RedisHash is an output type that writes hash objects to Redis using the HMSET command.
func NewRedisHash ¶
NewRedisHash creates a new RedisHash output type.
func (*RedisHash) CloseAsync ¶
func (r *RedisHash) CloseAsync()
CloseAsync shuts down the RedisHash output and stops processing messages.
func (*RedisHash) ConnectWithContext ¶
ConnectWithContext establishes a connection to an RedisHash server.
func (*RedisHash) WaitForClose ¶
WaitForClose blocks until the RedisHash output has closed down.
type RedisHashConfig ¶
type RedisHashConfig struct { URL string `json:"url" yaml:"url"` Key string `json:"key" yaml:"key"` WalkMetadata bool `json:"walk_metadata" yaml:"walk_metadata"` WalkJSONObject bool `json:"walk_json_object" yaml:"walk_json_object"` Fields map[string]string `json:"fields" yaml:"fields"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` }
RedisHashConfig contains configuration fields for the RedisHash output type.
func NewRedisHashConfig ¶
func NewRedisHashConfig() RedisHashConfig
NewRedisHashConfig creates a new RedisHashConfig with default values.
type RedisList ¶
type RedisList struct {
// contains filtered or unexported fields
}
RedisList is an output type that serves RedisList messages.
func NewRedisList ¶
NewRedisList creates a new RedisList output type.
func (*RedisList) CloseAsync ¶
func (r *RedisList) CloseAsync()
CloseAsync shuts down the RedisList output and stops processing messages.
func (*RedisList) ConnectWithContext ¶
ConnectWithContext establishes a connection to an RedisList server.
func (*RedisList) WaitForClose ¶
WaitForClose blocks until the RedisList output has closed down.
type RedisListConfig ¶
type RedisListConfig struct { URL string `json:"url" yaml:"url"` Key string `json:"key" yaml:"key"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` }
RedisListConfig contains configuration fields for the RedisList output type.
func NewRedisListConfig ¶
func NewRedisListConfig() RedisListConfig
NewRedisListConfig creates a new RedisListConfig with default values.
type RedisPubSub ¶
type RedisPubSub struct {
// contains filtered or unexported fields
}
RedisPubSub is an output type that serves RedisPubSub messages.
func NewRedisPubSub ¶
func NewRedisPubSub( conf RedisPubSubConfig, log log.Modular, stats metrics.Type, ) (*RedisPubSub, error)
NewRedisPubSub creates a new RedisPubSub output type.
func (*RedisPubSub) CloseAsync ¶
func (r *RedisPubSub) CloseAsync()
CloseAsync shuts down the RedisPubSub output and stops processing messages.
func (*RedisPubSub) Connect ¶
func (r *RedisPubSub) Connect() error
Connect establishes a connection to an RedisPubSub server.
func (*RedisPubSub) ConnectWithContext ¶
func (r *RedisPubSub) ConnectWithContext(ctx context.Context) error
ConnectWithContext establishes a connection to an RedisPubSub server.
func (*RedisPubSub) WaitForClose ¶
func (r *RedisPubSub) WaitForClose(timeout time.Duration) error
WaitForClose blocks until the RedisPubSub output has closed down.
func (*RedisPubSub) Write ¶
func (r *RedisPubSub) Write(msg types.Message) error
Write attempts to write a message by pushing it to a Redis pub/sub topic.
func (*RedisPubSub) WriteWithContext ¶
WriteWithContext attempts to write a message by pushing it to a Redis pub/sub topic.
type RedisPubSubConfig ¶
type RedisPubSubConfig struct { URL string `json:"url" yaml:"url"` Channel string `json:"channel" yaml:"channel"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` }
RedisPubSubConfig contains configuration fields for the RedisPubSub output type.
func NewRedisPubSubConfig ¶
func NewRedisPubSubConfig() RedisPubSubConfig
NewRedisPubSubConfig creates a new RedisPubSubConfig with default values.
type RedisStreams ¶
type RedisStreams struct {
// contains filtered or unexported fields
}
RedisStreams is an output type that serves RedisStreams messages.
func NewRedisStreams ¶
func NewRedisStreams( conf RedisStreamsConfig, log log.Modular, stats metrics.Type, ) (*RedisStreams, error)
NewRedisStreams creates a new RedisStreams output type.
func (*RedisStreams) CloseAsync ¶
func (r *RedisStreams) CloseAsync()
CloseAsync shuts down the RedisStreams output and stops processing messages.
func (*RedisStreams) Connect ¶
func (r *RedisStreams) Connect() error
Connect establishes a connection to an RedisStreams server.
func (*RedisStreams) ConnectWithContext ¶
func (r *RedisStreams) ConnectWithContext(ctx context.Context) error
ConnectWithContext establishes a connection to an RedisStreams server.
func (*RedisStreams) WaitForClose ¶
func (r *RedisStreams) WaitForClose(timeout time.Duration) error
WaitForClose blocks until the RedisStreams output has closed down.
func (*RedisStreams) Write ¶
func (r *RedisStreams) Write(msg types.Message) error
Write attempts to write a message by pushing it to a Redis stream.
func (*RedisStreams) WriteWithContext ¶
WriteWithContext attempts to write a message by pushing it to a Redis stream.
type RedisStreamsConfig ¶
type RedisStreamsConfig struct { URL string `json:"url" yaml:"url"` Stream string `json:"stream" yaml:"stream"` BodyKey string `json:"body_key" yaml:"body_key"` MaxLenApprox int64 `json:"max_length" yaml:"max_length"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` }
RedisStreamsConfig contains configuration fields for the RedisStreams output type.
func NewRedisStreamsConfig ¶
func NewRedisStreamsConfig() RedisStreamsConfig
NewRedisStreamsConfig creates a new RedisStreamsConfig with default values.
type SNS ¶
type SNS struct {
// contains filtered or unexported fields
}
SNS is a benthos writer.Type implementation that writes messages to an Amazon SNS queue.
func (*SNS) CloseAsync ¶
func (a *SNS) CloseAsync()
CloseAsync begins cleaning up resources used by this reader asynchronously.
func (*SNS) ConnectWithContext ¶
ConnectWithContext attempts to establish a connection to the target SNS queue.
func (*SNS) WaitForClose ¶
WaitForClose will block until either the reader is closed or a specified timeout occurs.
type SNSConfig ¶
type SNSConfig struct { TopicArn string `json:"topic_arn" yaml:"topic_arn"` Timeout string `json:"timeout" yaml:"timeout"` MaxInFlight int `json:"max_in_flight" yaml:"max_in_flight"` // contains filtered or unexported fields }
SNSConfig contains configuration fields for the output SNS type.
func NewSNSConfig ¶
func NewSNSConfig() SNSConfig
NewSNSConfig creates a new Config with default values.
type Socket ¶
type Socket struct {
// contains filtered or unexported fields
}
Socket is an output type that sends messages as a continuous steam of line delimied messages over socket.
func NewSocket ¶
func NewSocket( conf SocketConfig, mgr types.Manager, log log.Modular, stats metrics.Type, ) (*Socket, error)
NewSocket creates a new Socket writer type.
func (*Socket) CloseAsync ¶
func (s *Socket) CloseAsync()
CloseAsync shuts down the socket output and stops processing messages.
func (*Socket) WaitForClose ¶
WaitForClose blocks until the socket output has closed down.
type SocketConfig ¶
type SocketConfig struct { Network string `json:"network" yaml:"network"` Address string `json:"address" yaml:"address"` }
SocketConfig contains configuration fields for the Socket output type.
func NewSocketConfig ¶
func NewSocketConfig() SocketConfig
NewSocketConfig creates a new SocketConfig with default values.
type TCP ¶
type TCP struct {
// contains filtered or unexported fields
}
TCP is an output type that sends messages as a continuous steam of line delimied messages over TCP.
func NewTCP ¶
func NewTCP( conf TCPConfig, mgr types.Manager, log log.Modular, stats metrics.Type, ) (*TCP, error)
NewTCP creates a new TCP writer type.
func (*TCP) CloseAsync ¶
func (t *TCP) CloseAsync()
CloseAsync shuts down the TCP output and stops processing messages.
func (*TCP) WaitForClose ¶
WaitForClose blocks until the TCP output has closed down.
type TCPConfig ¶
type TCPConfig struct {
Address string `json:"address" yaml:"address"`
}
TCPConfig contains configuration fields for the TCP output type.
func NewTCPConfig ¶
func NewTCPConfig() TCPConfig
NewTCPConfig creates a new TCPConfig with default values.
type Type ¶
type Type interface { // Connect attempts to establish a connection to the sink, if unsuccessful // returns an error. If the attempt is successful (or not necessary) returns // nil. Connect() error // Write should block until either the message is sent (and acknowledged) to // a sink, or a transport specific error has occurred, or the Type is // closed. Write(msg types.Message) error types.Closable }
Type is a type that writes Benthos messages to a third party sink. If the protocol supports a form of acknowledgement then it will be returned by the call to Write.
type UDP ¶
type UDP struct {
// contains filtered or unexported fields
}
UDP is an output type that sends messages as a continuous steam of line delimied messages over UDP.
func NewUDP ¶
func NewUDP( conf UDPConfig, mgr types.Manager, log log.Modular, stats metrics.Type, ) (*UDP, error)
NewUDP creates a new UDP writer type.
func (*UDP) CloseAsync ¶
func (t *UDP) CloseAsync()
CloseAsync shuts down the UDP output and stops processing messages.
func (*UDP) WaitForClose ¶
WaitForClose blocks until the UDP output has closed down.
type UDPConfig ¶
type UDPConfig struct {
Address string `json:"address" yaml:"address"`
}
UDPConfig contains configuration fields for the UDP output type.
func NewUDPConfig ¶
func NewUDPConfig() UDPConfig
NewUDPConfig creates a new UDPConfig with default values.
type Websocket ¶
type Websocket struct {
// contains filtered or unexported fields
}
Websocket is an output type that serves Websocket messages.
func NewWebsocket ¶
NewWebsocket creates a new Websocket output type.
func (*Websocket) CloseAsync ¶
func (w *Websocket) CloseAsync()
CloseAsync shuts down the Websocket output and stops processing messages.
func (*Websocket) WaitForClose ¶
WaitForClose blocks until the Websocket output has closed down.
type WebsocketConfig ¶
type WebsocketConfig struct { URL string `json:"url" yaml:"url"` auth.Config `json:",inline" yaml:",inline"` }
WebsocketConfig contains configuration fields for the Websocket output type.
func NewWebsocketConfig ¶
func NewWebsocketConfig() WebsocketConfig
NewWebsocketConfig creates a new WebsocketConfig with default values.
Source Files ¶
- amqp.go
- cache.go
- drop.go
- dynamodb.go
- elasticsearch.go
- files.go
- gcp_pubsub.go
- hdfs.go
- http_client.go
- interface.go
- kafka.go
- kinesis.go
- kinesis_firehose.go
- mqtt.go
- nanomsg.go
- nats.go
- nats_stream.go
- nsq.go
- package.go
- redis_hash.go
- redis_list.go
- redis_pubsub.go
- redis_streams.go
- s3.go
- sns.go
- socket.go
- sqs.go
- tcp.go
- udp.go
- websocket.go
- zmq4_stub.go