ch

package module
v0.0.0-...-4107d71 Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

README

clickhouse-batcher

asynchronous sending batches to clickhouse

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpMigrations

func UpMigrations(ctx context.Context, dsn string) error

Types

type Logger

type Logger interface {
	Errorf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Debugf(format string, args ...interface{})
	Debugw(msg string, keysAndValues ...interface{})
}

type Repository

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

func NewRepository

func NewRepository(log Logger, enabled bool) *Repository

func (*Repository) Connect

func (repo *Repository) Connect(ctx context.Context, cfg app.Clickhouse) error

func (*Repository) ProcessHashes

func (repo *Repository) ProcessHashes(ctx context.Context, saveInterval time.Duration)

func (*Repository) SaveAsync

func (repo *Repository) SaveAsync(_ context.Context, hashEntity any)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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