Documentation
¶
Index ¶
- Variables
- type BatchCapacity
- type BatchFlushedCountReporter
- type BatchWriter
- type BatchWriterOpt
- type ClickOptions
- func (bld *ClickOptions) New(ctx context.Context) (driver.Conn, error)
- func (bld *ClickOptions) WithBlockBufferSize(size uint8) *ClickOptions
- func (bld *ClickOptions) WithClientInfo(name, version string) *ClickOptions
- func (bld *ClickOptions) WithCompression() *ClickOptions
- func (bld *ClickOptions) WithConnMaxLifetime(d time.Duration) *ClickOptions
- func (bld *ClickOptions) WithConnOpenStrategy(s clickhouse.ConnOpenStrategy) *ClickOptions
- func (bld *ClickOptions) WithDebug(log logger.TypeOfLogger) *ClickOptions
- func (bld *ClickOptions) WithDialTimeout(d time.Duration) *ClickOptions
- func (bld *ClickOptions) WithMaxCompressionBuffer(size int) *ClickOptions
- func (bld *ClickOptions) WithMaxExecutionTime(t int) *ClickOptions
- func (bld *ClickOptions) WithMaxIdleConns(c int) *ClickOptions
- func (bld *ClickOptions) WithMaxOpenConns(c int) *ClickOptions
- func (bld *ClickOptions) WithTLSConf(tls *tls.Config)
- type CountDBWriteEvent
- type Reader
- type Registry
- type Scope
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNoRegistry - ErrNoRegistry = errors.New("no registry available") // ErrWriterClosed - ErrWriterClosed = errors.New("writer is closed") )
Functions ¶
This section is empty.
Types ¶
type BatchFlushedCountReporter ¶
type BatchFlushedCountReporter func(int)
BatchFlushedCountReporter reports count rows were flushed by batch
type BatchWriter ¶
type BatchWriter interface { PutTrace(*model.TraceModel) error PutNftTable(*model.NftTableModel) error Flush() error Close() error }
BatchWriter db batch writer abstract
type BatchWriterOpt ¶
type BatchWriterOpt interface {
// contains filtered or unexported methods
}
type ClickOptions ¶
type ClickOptions clickhouse.Options
func BuildFromDSN ¶
func BuildFromDSN(dsn string) (*ClickOptions, error)
BuildFromDSN - create build from the dsn link
func (*ClickOptions) WithBlockBufferSize ¶
func (bld *ClickOptions) WithBlockBufferSize(size uint8) *ClickOptions
WithBlockBufferSize - maximum number of blocks to decode into the buffer at once. Larger values will increase parallelization at the expense of memory. Block sizes are query dependent so while you can set this on the connection, we recommend you override per query based on the data it returns. Defaults to 2.
func (*ClickOptions) WithClientInfo ¶
func (bld *ClickOptions) WithClientInfo(name, version string) *ClickOptions
WithClientInfo - some client information
func (*ClickOptions) WithCompression ¶
func (bld *ClickOptions) WithCompression() *ClickOptions
WithCompression - enable compression for blocks
func (*ClickOptions) WithConnMaxLifetime ¶
func (bld *ClickOptions) WithConnMaxLifetime(d time.Duration) *ClickOptions
WithConnMaxLifetime - maximum lifetime to keep a connection available. Defaults to 1hr. Connections are destroyed after this time, with new connections added to the pool as required.
func (*ClickOptions) WithConnOpenStrategy ¶
func (bld *ClickOptions) WithConnOpenStrategy(s clickhouse.ConnOpenStrategy) *ClickOptions
WithConnOpenStrategy - determines how the list of node addresses should be consumed and used to open connections
func (*ClickOptions) WithDebug ¶
func (bld *ClickOptions) WithDebug(log logger.TypeOfLogger) *ClickOptions
WithDebug - enable debugging
func (*ClickOptions) WithDialTimeout ¶
func (bld *ClickOptions) WithDialTimeout(d time.Duration) *ClickOptions
WithDialTimeout - the maximum time to establish a connection. Defaults to 1s
func (*ClickOptions) WithMaxCompressionBuffer ¶
func (bld *ClickOptions) WithMaxCompressionBuffer(size int) *ClickOptions
func (*ClickOptions) WithMaxExecutionTime ¶
func (bld *ClickOptions) WithMaxExecutionTime(t int) *ClickOptions
WithMaxExecutionTime - max time for one transaction
func (*ClickOptions) WithMaxIdleConns ¶
func (bld *ClickOptions) WithMaxIdleConns(c int) *ClickOptions
WithMaxIdleConns - number of connections to maintain in the pool. Connections will be reused if possible. Defaults to 5
func (*ClickOptions) WithMaxOpenConns ¶
func (bld *ClickOptions) WithMaxOpenConns(c int) *ClickOptions
WithMaxOpenConns - max connections for use at any time. More or fewer connections may be in the idle pool, but only this number can be used at any time. Defaults to MaxIdleConns+5
func (*ClickOptions) WithTLSConf ¶
func (bld *ClickOptions) WithTLSConf(tls *tls.Config)
WithTLSConf - TLS options. A non-nil value enables TLS
type CountDBWriteEvent ¶
type Reader ¶
type Reader interface { FetchTraces(context.Context, *model.TraceScopeModel) ([]model.FetchTraceModel, error) FetchNftTable(context.Context, Scope) ([]model.FetchNftTableModel, error) Close() error }
Reader db reader abstract