Documentation ¶
Overview ¶
Package writer defines implementations of an interface for generic message writing that outputs to various third party sinks.
Index ¶
- type AMQP
- type AMQPConfig
- type AmazonAWSCredentialsConfig
- type AmazonS3
- type AmazonS3Config
- type AmazonSQS
- type AmazonSQSConfig
- type Elasticsearch
- type ElasticsearchConfig
- type Files
- type FilesConfig
- type HTTPClient
- type HTTPClientConfig
- type Kafka
- type KafkaConfig
- type MQTT
- type MQTTConfig
- type RedisList
- type RedisListConfig
- type Type
- type Websocket
- type WebsocketConfig
- type ZMQ4Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AMQP ¶ added in v0.15.1
type AMQP struct {
// contains filtered or unexported fields
}
AMQP is an output type that serves AMQP messages.
func (*AMQP) CloseAsync ¶ added in v0.15.1
func (a *AMQP) CloseAsync()
CloseAsync shuts down the AMQP output and stops processing messages.
func (*AMQP) WaitForClose ¶ added in v0.15.1
WaitForClose blocks until the AMQP output has closed down.
type AMQPConfig ¶ added in v0.15.1
type AMQPConfig struct { URL string `json:"url" yaml:"url"` Exchange string `json:"exchange" yaml:"exchange"` ExchangeType string `json:"exchange_type" yaml:"exchange_type"` BindingKey string `json:"key" yaml:"key"` Persistent bool `json:"persistent" yaml:"persistent"` Mandatory bool `json:"mandatory" yaml:"mandatory"` Immediate bool `json:"immediate" yaml:"immediate"` }
AMQPConfig is configuration for the AMQP output type.
func NewAMQPConfig ¶ added in v0.15.1
func NewAMQPConfig() AMQPConfig
NewAMQPConfig creates a new AMQPConfig with default values.
type AmazonAWSCredentialsConfig ¶ added in v0.7.5
type AmazonAWSCredentialsConfig struct { ID string `json:"id" yaml:"id"` Secret string `json:"secret" yaml:"secret"` Token string `json:"token" yaml:"token"` Role string `json:"role" yaml:"role"` }
AmazonAWSCredentialsConfig contains configuration params for AWS credentials.
type AmazonS3 ¶ added in v0.7.5
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 ¶ added in v0.7.5
NewAmazonS3 creates a new Amazon S3 bucket writer.Type.
func (*AmazonS3) CloseAsync ¶ added in v0.7.5
func (a *AmazonS3) CloseAsync()
CloseAsync begins cleaning up resources used by this reader asynchronously.
func (*AmazonS3) Connect ¶ added in v0.7.5
Connect attempts to establish a connection to the target S3 bucket and any relevant queues used to traverse the objects (SQS, etc).
func (*AmazonS3) WaitForClose ¶ added in v0.7.5
WaitForClose will block until either the reader is closed or a specified timeout occurs.
type AmazonS3Config ¶ added in v0.7.5
type AmazonS3Config struct { Region string `json:"region" yaml:"region"` Bucket string `json:"bucket" yaml:"bucket"` Path string `json:"path" yaml:"path"` Credentials AmazonAWSCredentialsConfig `json:"credentials" yaml:"credentials"` TimeoutS int64 `json:"timeout_s" yaml:"timeout_s"` }
AmazonS3Config is configuration values for the input type.
func NewAmazonS3Config ¶ added in v0.7.5
func NewAmazonS3Config() AmazonS3Config
NewAmazonS3Config creates a new Config with default values.
type AmazonSQS ¶ added in v0.8.1
type AmazonSQS struct {
// contains filtered or unexported fields
}
AmazonSQS is a benthos writer.Type implementation that writes messages to an Amazon S3 bucket.
func NewAmazonSQS ¶ added in v0.8.1
NewAmazonSQS creates a new Amazon S3 bucket writer.Type.
func (*AmazonSQS) CloseAsync ¶ added in v0.8.1
func (a *AmazonSQS) CloseAsync()
CloseAsync begins cleaning up resources used by this reader asynchronously.
func (*AmazonSQS) Connect ¶ added in v0.8.1
Connect attempts to establish a connection to the target S3 bucket and any relevant queues used to traverse the objects (SQS, etc).
func (*AmazonSQS) WaitForClose ¶ added in v0.8.1
WaitForClose will block until either the reader is closed or a specified timeout occurs.
type AmazonSQSConfig ¶ added in v0.8.1
type AmazonSQSConfig struct { Region string `json:"region" yaml:"region"` URL string `json:"url" yaml:"url"` Credentials AmazonAWSCredentialsConfig `json:"credentials" yaml:"credentials"` }
AmazonSQSConfig is configuration values for the input type.
func NewAmazonSQSConfig ¶ added in v0.8.1
func NewAmazonSQSConfig() AmazonSQSConfig
NewAmazonSQSConfig creates a new Config with default values.
type Elasticsearch ¶ added in v0.10.7
type Elasticsearch struct {
// contains filtered or unexported fields
}
Elasticsearch is a writer type that writes messages into elasticsearch.
func NewElasticsearch ¶ added in v0.10.7
func NewElasticsearch(conf ElasticsearchConfig, log log.Modular, stats metrics.Type) (*Elasticsearch, error)
NewElasticsearch creates a new Elasticsearch writer type.
func (*Elasticsearch) CloseAsync ¶ added in v0.10.7
func (e *Elasticsearch) CloseAsync()
CloseAsync shuts down the Elasticsearch writer and stops processing messages.
func (*Elasticsearch) Connect ¶ added in v0.10.7
func (e *Elasticsearch) Connect() error
Connect attempts to establish a connection to a Elasticsearch broker.
func (*Elasticsearch) WaitForClose ¶ added in v0.10.7
func (e *Elasticsearch) WaitForClose(timeout time.Duration) error
WaitForClose blocks until the Elasticsearch writer has closed down.
type ElasticsearchConfig ¶ added in v0.10.7
type ElasticsearchConfig struct { URLs []string `json:"urls" yaml:"urls"` ID string `json:"id" yaml:"id"` Index string `json:"index" yaml:"index"` TimeoutMS int `json:"timeout_ms" yaml:"timeout_ms"` Auth auth.BasicAuthConfig `json:"basic_auth" yaml:"basic_auth"` }
ElasticsearchConfig is configuration for the Elasticsearch output type.
func NewElasticsearchConfig ¶ added in v0.10.7
func NewElasticsearchConfig() ElasticsearchConfig
NewElasticsearchConfig creates a new ElasticsearchConfig with default values.
type Files ¶ added in v0.7.7
type Files struct {
// contains filtered or unexported fields
}
Files is a benthos writer.Type implementation that writes messages parts each to their own file.
func (*Files) CloseAsync ¶ added in v0.7.7
func (f *Files) CloseAsync()
CloseAsync begins cleaning up resources used by this reader asynchronously.
func (*Files) WaitForClose ¶ added in v0.7.7
WaitForClose will block until either the reader is closed or a specified timeout occurs.
type FilesConfig ¶ added in v0.7.7
type FilesConfig struct {
Path string `json:"path" yaml:"path"`
}
FilesConfig is configuration values for the input type.
func NewFilesConfig ¶ added in v0.7.7
func NewFilesConfig() FilesConfig
NewFilesConfig creates a new Config with default values.
type HTTPClient ¶ added in v0.14.0
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient is an output type that pushes messages to HTTPClient.
func NewHTTPClient ¶ added in v0.14.0
func NewHTTPClient(conf HTTPClientConfig, log log.Modular, stats metrics.Type) *HTTPClient
NewHTTPClient creates a new HTTPClient writer type.
func (*HTTPClient) CloseAsync ¶ added in v0.14.0
func (h *HTTPClient) CloseAsync()
CloseAsync shuts down the HTTPClient output and stops processing messages.
func (*HTTPClient) Connect ¶ added in v0.14.0
func (h *HTTPClient) Connect() error
Connect does nothing.
func (*HTTPClient) WaitForClose ¶ added in v0.14.0
func (h *HTTPClient) WaitForClose(timeout time.Duration) error
WaitForClose blocks until the HTTPClient output has closed down.
type HTTPClientConfig ¶ added in v0.14.0
type HTTPClientConfig struct { URL string `json:"url" yaml:"url"` Verb string `json:"verb" yaml:"verb"` ContentType string `json:"content_type" yaml:"content_type"` TimeoutMS int64 `json:"timeout_ms" yaml:"timeout_ms"` RetryMS int64 `json:"retry_period_ms" yaml:"retry_period_ms"` MaxBackoffMS int64 `json:"max_retry_backoff_ms" yaml:"max_retry_backoff_ms"` NumRetries int `json:"retries" yaml:"retries"` BackoffOn []int `json:"backoff_on" yaml:"backoff_on"` DropOn []int `json:"drop_on" yaml:"drop_on"` SkipCertVerify bool `json:"skip_cert_verify" yaml:"skip_cert_verify"` auth.Config `json:",inline" yaml:",inline"` }
HTTPClientConfig is configuration for the HTTPClient output type.
func NewHTTPClientConfig ¶ added in v0.14.0
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 (*Kafka) CloseAsync ¶
func (k *Kafka) CloseAsync()
CloseAsync shuts down the Kafka writer and stops processing messages.
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"` RoundRobinPartitions bool `json:"round_robin_partitions" yaml:"round_robin_partitions"` Topic string `json:"topic" yaml:"topic"` Compression string `json:"compression" yaml:"compression"` MaxMsgBytes int `json:"max_msg_bytes" yaml:"max_msg_bytes"` TimeoutMS int `json:"timeout_ms" yaml:"timeout_ms"` AckReplicas bool `json:"ack_replicas" yaml:"ack_replicas"` TargetVersion string `json:"target_version" yaml:"target_version"` }
KafkaConfig is configuration for the Kafka output type.
func NewKafkaConfig ¶
func NewKafkaConfig() KafkaConfig
NewKafkaConfig creates a new KafkaConfig with default values.
type MQTT ¶ added in v0.8.7
type MQTT struct {
// contains filtered or unexported fields
}
MQTT is an output type that serves MQTT messages.
func (*MQTT) CloseAsync ¶ added in v0.8.7
func (m *MQTT) CloseAsync()
CloseAsync shuts down the MQTT output and stops processing messages.
func (*MQTT) WaitForClose ¶ added in v0.8.7
WaitForClose blocks until the MQTT output has closed down.
type MQTTConfig ¶ added in v0.8.7
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"` }
MQTTConfig is configuration for the MQTT output type.
func NewMQTTConfig ¶ added in v0.8.7
func NewMQTTConfig() MQTTConfig
NewMQTTConfig creates a new MQTTConfig 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) 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"` }
RedisListConfig is configuration for the RedisList output type.
func NewRedisListConfig ¶
func NewRedisListConfig() RedisListConfig
NewRedisListConfig creates a new RedisListConfig 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.
type Websocket ¶ added in v0.13.2
type Websocket struct {
// contains filtered or unexported fields
}
Websocket is an output type that serves Websocket messages.
func NewWebsocket ¶ added in v0.13.2
NewWebsocket creates a new Websocket output type.
func (*Websocket) CloseAsync ¶ added in v0.13.2
func (w *Websocket) CloseAsync()
CloseAsync shuts down the Websocket output and stops processing messages.
func (*Websocket) Connect ¶ added in v0.13.2
Connect establishes a connection to an Websocket server.
func (*Websocket) WaitForClose ¶ added in v0.13.2
WaitForClose blocks until the Websocket output has closed down.
type WebsocketConfig ¶ added in v0.13.2
type WebsocketConfig struct { URL string `json:"url" yaml:"url"` auth.Config `json:",inline" yaml:",inline"` }
WebsocketConfig is configuration for the Websocket output type.
func NewWebsocketConfig ¶ added in v0.13.2
func NewWebsocketConfig() WebsocketConfig
NewWebsocketConfig creates a new WebsocketConfig with default values.
type ZMQ4Config ¶ added in v0.9.0
type ZMQ4Config struct{}
ZMQ4Config empty stub for when ZMQ4 is not compiled.