clickhouse

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authentication

type Authentication struct {
	// PlainText authentication
	PlainText *PlainTextConfig
	// TLS authentication
	TLS *tlscommon.TLSConfig
}

func (*Authentication) ConfigureAuthentication

func (config *Authentication) ConfigureAuthentication(opts *clickhouse.Options) error

type FlusherClickHouse

type FlusherClickHouse struct {
	// Convert ilogtail data convert config
	Convert convertConfig
	// Addresses clickhouse addresses
	Addresses []string
	// Authentication using PLAIN
	Authentication Authentication
	// Cluster ClickHouse cluster name
	Cluster string
	// Table Target of data writing
	Table string
	// Compression Data compression strategy
	Compression string
	// MaxExecutionTime Timeout duration of a single request, unit: second , the default is  60
	MaxExecutionTime int
	// DialTimeout Dial timeout, the default is 10s
	DialTimeout time.Duration
	// MaxOpenConns Maximum number of connections, including long and short connections, the default is 5
	MaxOpenConns int
	// MaxIdleConns The maximum number of idle connections, that is the size of the connection pool, the default is 5
	MaxIdleConns int
	// ConnMaxLifetime Connection maximum lifetime, the default is 10m
	ConnMaxLifetime time.Duration
	// BlockBufferSize, size of block buffer, the default is 10
	BlockBufferSize uint8

	// ClickHouse Buffer engine configuration
	// The number of buffer, recommended as 16
	// Data is flushed to disk when all min conditions are met, or when one max condition is met
	BufferNumLayers int
	BufferMinTime   int
	BufferMaxTime   int
	BufferMinRows   int
	BufferMaxRows   int
	BufferMinBytes  int
	BufferMaxBytes  int
	// contains filtered or unexported fields
}

func NewFlusherClickHouse

func NewFlusherClickHouse() *FlusherClickHouse

func (*FlusherClickHouse) BufferFlush

func (f *FlusherClickHouse) BufferFlush(projectName string, logstoreName string, configName string, logGroupList []*protocol.LogGroup) error

func (*FlusherClickHouse) Description

func (f *FlusherClickHouse) Description() string

func (*FlusherClickHouse) Flush

func (f *FlusherClickHouse) Flush(projectName string, logstoreName string, configName string, logGroupList []*protocol.LogGroup) error

func (*FlusherClickHouse) Init

func (f *FlusherClickHouse) Init(context pipeline.Context) error

func (*FlusherClickHouse) IsReady

func (f *FlusherClickHouse) IsReady(projectName string, logstoreName string, logstoreKey int64) bool

func (*FlusherClickHouse) SetUrgent

func (f *FlusherClickHouse) SetUrgent(flag bool)

func (*FlusherClickHouse) Stop

func (f *FlusherClickHouse) Stop() error

func (*FlusherClickHouse) Validate

func (f *FlusherClickHouse) Validate() error

type FlusherFunc

type FlusherFunc func(projectName string, logstoreName string, configName string, logGroupList []*protocol.LogGroup) error

type PlainTextConfig

type PlainTextConfig struct {
	// The username for connecting to clickhouse.
	Username string
	// The password for connecting to clickhouse.
	Password string
	// The default database
	Database string
}

func (*PlainTextConfig) ConfigurePlaintext

func (plainTextConfig *PlainTextConfig) ConfigurePlaintext(opts *clickhouse.Options) error

Jump to

Keyboard shortcuts

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