async_kafka

package
v0.9.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 8, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const AsyncKafkaPluginName = "async-kafka"

Variables

View Source
var (
	KafkaMsgSizeGaugeVec = prometheus.NewGaugeVec(
		prometheus.GaugeOpts{
			Namespace: "drc_v2",
			Subsystem: "output_async_kafka",
			Name:      "binlog_msg_size",
			Help:      "binlog msg size",
		}, []string{metrics.PipelineTag, metrics.TopicTag},
	)

	KafkaEnqueuedCount = prometheus.NewCounterVec(prometheus.CounterOpts{
		Namespace: "drc_v2",
		Subsystem: "output_async_kafka",
		Name:      "kafka_enqueue",
		Help:      "Number of enqueued message of kafka by topic",
	}, []string{metrics.PipelineTag, metrics.TopicTag})

	KafkaSuccessCount = prometheus.NewCounterVec(prometheus.CounterOpts{
		Namespace: "drc_v2",
		Subsystem: "output_async_kafka",
		Name:      "kafka_success",
		Help:      "Number of success message of kafka",
	}, []string{metrics.PipelineTag, metrics.TopicTag})

	KafkaPartitionCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Namespace: "drc_v2",
			Subsystem: "output_async_kafka",
			Name:      "partition_counter",
			Help:      "the number of message sent to each partition",
		}, []string{metrics.PipelineTag, metrics.TopicTag, metrics.PartitionTag})
)

Functions

This section is empty.

Types

type AsyncKafka

type AsyncKafka struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*AsyncKafka) Close

func (output *AsyncKafka) Close()

func (*AsyncKafka) Configure

func (output *AsyncKafka) Configure(pipelineName string, data map[string]interface{}) error

func (*AsyncKafka) Execute

func (output *AsyncKafka) Execute(msgs []*core.Msg) error

func (*AsyncKafka) Start

func (output *AsyncKafka) Start(msgAcker core.MsgAcker) error

type AsyncKafkaPluginConfig

type AsyncKafkaPluginConfig struct {
	KafkaConfig   *config.KafkaGlobalConfig `mapstructure:"kafka-global-config"`
	Routes        []map[string]interface{}  `mapstructure:"routes"`
	OutputFormat  string                    `mapstructure:"output-format"`
	SchemaVersion string                    `mapstructure:"schema-version"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL