outputs

package
v0.0.0-...-41b7643 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClickHouseConfig

type ClickHouseConfig struct {
	DSN           string            `yaml:"dsn"`
	Database      string            `yaml:"database"`
	Username      string            `yaml:"username"`
	Password      string            `yaml:"password"`
	Table         string            `yaml:"table"`
	BatchSize     int               `yaml:"batch_size"`
	FlushInterval time.Duration     `yaml:"flush_interval"`
	Columns       map[string]string `yaml:"columns"`    // sample fields to column names
	CustomSQL     string            `yaml:"custom_sql"` // custom insert SQL template
	TLS           bool              `yaml:"tls"`
}

type ClickHouseOutput

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

func NewClickHouseOutput

func NewClickHouseOutput(config map[string]interface{}, level logrus.Level) (*ClickHouseOutput, error)

func (*ClickHouseOutput) Close

func (c *ClickHouseOutput) Close() error

func (*ClickHouseOutput) Flush

func (c *ClickHouseOutput) Flush() error

func (*ClickHouseOutput) Send

func (c *ClickHouseOutput) Send(sample *sflow.SFlowSample) error

type ConsoleOutput

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

func NewConsoleOutput

func NewConsoleOutput(config map[string]interface{}, level logrus.Level) (*ConsoleOutput, error)

func (*ConsoleOutput) Close

func (c *ConsoleOutput) Close() error

func (*ConsoleOutput) Send

func (c *ConsoleOutput) Send(sample *sflow.SFlowSample) error

type KafkaOutput

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

func NewKafkaOutput

func NewKafkaOutput(config map[string]interface{}, level logrus.Level) (*KafkaOutput, error)

func (*KafkaOutput) Close

func (k *KafkaOutput) Close() error

func (*KafkaOutput) Send

func (k *KafkaOutput) Send(sample *sflow.SFlowSample) error

type Output

type Output interface {
	Send(sample *sflow.SFlowSample) error
	Close() error
}

type SFlowCollectorOutput

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

func NewSFlowCollectorOutput

func NewSFlowCollectorOutput(config map[string]interface{}, level logrus.Level) (*SFlowCollectorOutput, error)

func (*SFlowCollectorOutput) Close

func (s *SFlowCollectorOutput) Close() error

func (*SFlowCollectorOutput) Send

func (s *SFlowCollectorOutput) Send(sample *sflow.SFlowSample) error

Jump to

Keyboard shortcuts

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