kafka

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

README

[outputs] plugin kafka

{
    "kafka": {
        "addrs": [
            "192.168.0.1:9092",
            "192.168.0.2:9092",
            "192.168.0.3:9092"
        ],
        "topic": "test",
        "max_procs": 100000
    }
}

Documentation

Index

Constants

View Source
const (
	VERSION = "0.0.1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type KafkaOutput

type KafkaOutput struct {
	Addrs    []string `json:"addrs"`
	Topic    string   `json:"topic"`
	MaxProcs int      `json:"max_procs"` //最大并发写协程

	Message chan []byte //将数据写入这个管道中
	// contains filtered or unexported fields
}

func NewKafkaOutput

func NewKafkaOutput() *KafkaOutput

func (*KafkaOutput) ChanInfo

func (out *KafkaOutput) ChanInfo() string

func (*KafkaOutput) Close

func (out *KafkaOutput) Close() error

func (*KafkaOutput) Init

func (out *KafkaOutput) Init(config transport.Configer) error

func (*KafkaOutput) Start

func (out *KafkaOutput) Start() error

func (*KafkaOutput) Version

func (out *KafkaOutput) Version() string

func (*KafkaOutput) Write

func (out *KafkaOutput) Write(msg []byte) (int, error)

func (*KafkaOutput) WriteToTopic

func (out *KafkaOutput) WriteToTopic() error

Jump to

Keyboard shortcuts

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