Documentation
¶
Index ¶
- func ConvertToJSONCompatible(input any) any
- func GetInput(inputType string, config map[any]any) topology.Input
- func Register(inputType string, bf BuildInputFunc)
- func SafeDecodeConfig(inputType string, config map[any]any, result any)
- func ValidateRequiredFields(inputType string, fields map[string]any)
- type BuildInputFunc
- type InputBox
- type KafkaInput
- type KafkaInputConfig
- type RandomInput
- type StdinConfig
- type StdinInput
- type TCPInput
- type UDPInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToJSONCompatible ¶ added in v1.12.0
ConvertToJSONCompatible recursively converts map[any]any to map[string]any for JSON compatibility
func Register ¶
func Register(inputType string, bf BuildInputFunc)
Register is used by input plugins to register themselves
func SafeDecodeConfig ¶ added in v1.12.0
SafeDecodeConfig safely decodes input configuration using encoding/json This provides detailed error messages from the standard library
func ValidateRequiredFields ¶ added in v1.12.0
ValidateRequiredFields checks that required fields are present in the decoded config
Types ¶
type InputBox ¶
type InputBox struct {
// contains filtered or unexported fields
}
func NewInputBox ¶
func (*InputBox) SetShutdownWhenNil ¶
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
type KafkaInput ¶
type KafkaInput struct {
// contains filtered or unexported fields
}
func (*KafkaInput) ReadOneEvent ¶
func (p *KafkaInput) ReadOneEvent() map[string]any
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 KafkaInputConfig ¶ added in v1.12.0
type KafkaInputConfig struct {
Codec string `json:"codec"`
DecorateEvents bool `json:"decorate_events"`
Topic map[string]int `json:"topic"`
Assign map[string][]int `json:"assign"`
MessagesQueueLength int `json:"messages_queue_length"`
ConsumerSettings map[string]any `json:"consumer_settings"`
}
KafkaInputConfig defines the configuration structure for Kafka input
type RandomInput ¶
type RandomInput struct {
// contains filtered or unexported fields
}
func (*RandomInput) ReadOneEvent ¶
func (p *RandomInput) ReadOneEvent() map[string]any
func (*RandomInput) Shutdown ¶
func (p *RandomInput) Shutdown()
type StdinConfig ¶ added in v1.12.0
type StdinConfig struct {
Codec string `json:"codec"`
}
StdinConfig defines the configuration structure for Stdin input
type StdinInput ¶
type StdinInput struct {
// contains filtered or unexported fields
}
func (*StdinInput) ReadOneEvent ¶
func (p *StdinInput) ReadOneEvent() map[string]any
func (*StdinInput) Shutdown ¶
func (p *StdinInput) Shutdown()
type TCPInput ¶
type TCPInput struct {
// contains filtered or unexported fields
}