error_log_logger

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: Apache-2.0 Imports: 22 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 {
	EndpointAddr string `json:"endpoint_addr,omitempty"`
	User         string `json:"user,omitempty"`
	Password     string `json:"password,omitempty"`
	Database     string `json:"database,omitempty"`
	LogTable     string `json:"logtable,omitempty"`
}

type Config

type Config struct {
	TCP        *TCPConfig        `json:"tcp,omitempty"`
	Skywalking *SkywalkingConfig `json:"skywalking,omitempty"`
	Clickhouse *ClickHouseConfig `json:"clickhouse,omitempty"`
	Kafka      *KafkaConfig      `json:"kafka,omitempty"`

	Host          string `json:"host,omitempty"`
	Port          int    `json:"port,omitempty"`
	TLS           bool   `json:"tls,omitempty"`
	TLSServerName string `json:"tls_server_name,omitempty"`

	Name              string `json:"name,omitempty"`
	Level             string `json:"level,omitempty"`
	Timeout           int    `json:"timeout,omitempty"`
	Keepalive         int    `json:"keepalive,omitempty"`
	BatchMaxSize      int    `json:"batch_max_size,omitempty"`
	MaxRetryCount     int    `json:"max_retry_count,omitempty"`
	RetryDelay        int    `json:"retry_delay,omitempty"`
	BufferDuration    int    `json:"buffer_duration,omitempty"`
	InactiveTimeout   int    `json:"inactive_timeout,omitempty"`
	MaxPendingEntries int    `json:"max_pending_entries,omitempty"`
}

type KafkaBroker

type KafkaBroker struct {
	Host       string      `json:"host"`
	Port       int         `json:"port"`
	SASLConfig *SASLConfig `json:"sasl_config,omitempty"`
}

type KafkaConfig

type KafkaConfig struct {
	Brokers             []KafkaBroker `json:"brokers,omitempty"`
	KafkaTopic          string        `json:"kafka_topic"`
	ProducerType        string        `json:"producer_type,omitempty"`
	RequiredAcks        int           `json:"required_acks,omitempty"`
	Key                 string        `json:"key,omitempty"`
	ClusterName         int           `json:"cluster_name,omitempty"`
	MetaRefreshInterval int           `json:"meta_refresh_interval,omitempty"`
}

type Plugin

type Plugin struct {
	base.BasePlugin

	BatchProcessor *logger_batch.Processor
	// contains filtered or unexported fields
}

func (*Plugin) Config

func (p *Plugin) Config() any

func (*Plugin) Handler

func (p *Plugin) Handler(next http.Handler) http.Handler

func (*Plugin) Init

func (p *Plugin) Init() error

func (*Plugin) PostInit

func (p *Plugin) PostInit() error

func (*Plugin) Send

func (p *Plugin) Send(log map[string]any)

func (*Plugin) SendBatch

func (p *Plugin) SendBatch(ctx context.Context, entries []map[string]any, _ int) (int, error)

func (*Plugin) SendLogs

func (p *Plugin) SendLogs(ctx context.Context, lines []string) error

func (*Plugin) StartObserving

func (p *Plugin) StartObserving()

func (*Plugin) Stop

func (p *Plugin) Stop()

type SASLConfig

type SASLConfig struct {
	Mechanism string `json:"mechanism,omitempty"`
	User      string `json:"user"`
	Password  string `json:"password"`
}

type SkywalkingConfig

type SkywalkingConfig struct {
	EndpointAddr        string `json:"endpoint_addr,omitempty"`
	ServiceName         string `json:"service_name,omitempty"`
	ServiceInstanceName string `json:"service_instance_name,omitempty"`
}

type TCPConfig

type TCPConfig struct {
	Host          string `json:"host"`
	Port          int    `json:"port"`
	TLS           bool   `json:"tls,omitempty"`
	TLSServerName string `json:"tls_server_name,omitempty"`
}

Jump to

Keyboard shortcuts

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