input

package
v1.10.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInput

func GetInput(inputType string, config map[interface{}]interface{}) topology.Input

GetInput return topoloty.Input from builtin plugins or from a 3rd party plugin

func Register

func Register(inputType string, bf BuildInputFunc)

Register is used by input plugins to register themselves

Types

type BuildInputFunc

type BuildInputFunc func(map[interface{}]interface{}) topology.Input

type InputBox

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

func NewInputBox

func NewInputBox(input topology.Input, inputConfig map[interface{}]interface{}, config map[string]interface{}, exit func()) *InputBox

func (*InputBox) Beat

func (box *InputBox) Beat(worker int)

Beat starts the processors and wait until shutdown

func (*InputBox) SetShutdownWhenNil

func (box *InputBox) SetShutdownWhenNil(shutdownWhenNil bool)

SetShutdownWhenNil is used for benchmark. Gohangout main thread would exit when one input box receive a nil message, such as Ctrl-D in Stdin input

func (*InputBox) Shutdown

func (box *InputBox) Shutdown()

Shutdown shutdowns the inputs and outputs

type KafkaInput

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

func (*KafkaInput) ReadOneEvent

func (p *KafkaInput) ReadOneEvent() map[string]interface{}

ReadOneEvent implement method in topology.Input. gohangout call this method to get one event and pass it to filter or output

func (*KafkaInput) Shutdown

func (p *KafkaInput) Shutdown()

Shutdown implement method in topology.Input. It closes all consumers

type RandomInput

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

func (*RandomInput) ReadOneEvent

func (p *RandomInput) ReadOneEvent() map[string]interface{}

func (*RandomInput) Shutdown

func (p *RandomInput) Shutdown()

type StdinInput

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

func (*StdinInput) ReadOneEvent

func (p *StdinInput) ReadOneEvent() map[string]interface{}

func (*StdinInput) Shutdown

func (p *StdinInput) Shutdown()

type TCPInput

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

func (*TCPInput) ReadOneEvent

func (p *TCPInput) ReadOneEvent() map[string]interface{}

func (*TCPInput) Shutdown

func (p *TCPInput) Shutdown()

type UDPInput

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

func (*UDPInput) ReadOneEvent

func (p *UDPInput) ReadOneEvent() map[string]interface{}

func (*UDPInput) Shutdown

func (p *UDPInput) Shutdown()

Jump to

Keyboard shortcuts

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