kafka

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(register eosc.IExtenderDriverRegister)

Register 注册kafka_output驱动工厂

Types

type Config

type Config struct {
	Topic         string               `json:"topic" yaml:"topic" label:"Topic"`
	Address       string               `json:"address" yaml:"address" label:"请求地址"`
	Timeout       int                  `json:"timeout" yaml:"timeout" label:"超时时间"`
	Version       string               `json:"version" yaml:"version" label:"版本"`
	PartitionType string               `json:"partition_type" yaml:"partition_type"`
	Partition     int32                `json:"partition" yaml:"partition"`
	PartitionKey  string               `json:"partition_key" yaml:"partition_key"`
	Type          string               `json:"type" yaml:"type" enum:"json,line" label:"输出格式"`
	Formatter     eosc.FormatterConfig `json:"formatter" yaml:"formatter" label:"格式化配置"`
}

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

func (*Driver) Check added in v0.8.0

func (d *Driver) Check(v interface{}, workers map[eosc.RequireId]interface{}) error

func (*Driver) ConfigType

func (d *Driver) ConfigType() reflect.Type

func (*Driver) Create

func (d *Driver) Create(id, name string, v interface{}, workers map[eosc.RequireId]eosc.IWorker) (eosc.IWorker, error)

func (*Driver) Render added in v0.8.0

func (d *Driver) Render() interface{}

type Factory

type Factory struct {
}

func NewFactory

func NewFactory() *Factory

func (*Factory) ConfigType added in v0.8.0

func (f *Factory) ConfigType() reflect.Type

func (*Factory) Create

func (f *Factory) Create(profession string, name string, label string, desc string, params map[string]interface{}) (eosc.IExtenderDriver, error)

func (*Factory) Render added in v0.6.0

func (f *Factory) Render() interface{}

type Output

type Output struct {
	// contains filtered or unexported fields
}

func (*Output) CheckSkill

func (o *Output) CheckSkill(skill string) bool

func (*Output) Id

func (o *Output) Id() string

func (*Output) Output

func (o *Output) Output(entry eosc.IEntry) error

func (*Output) Reset

func (o *Output) Reset(conf interface{}, workers map[eosc.RequireId]eosc.IWorker) error

func (*Output) Start

func (o *Output) Start() error

func (*Output) Stop

func (o *Output) Stop() error

type Producer added in v0.8.0

type Producer interface {
	// contains filtered or unexported methods
}

type ProducerConfig

type ProducerConfig struct {
	Address       []string             `json:"address" yaml:"address"`
	Topic         string               `json:"topic" yaml:"topic"`
	Partition     int32                `json:"partition" yaml:"partition"`
	PartitionKey  string               `json:"partition_key" yaml:"partition_key"`
	PartitionType string               `json:"partition_type" yaml:"partition_type"`
	Conf          *sarama.Config       `json:"conf" yaml:"conf"`
	Type          string               `json:"type" yaml:"type"`
	Formatter     eosc.FormatterConfig `json:"formatter" yaml:"formatter"`
}

Jump to

Keyboard shortcuts

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