builderv2

package
v0.4.5-rc1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StorageTypeTraceCal Used to store using jaegerJson format otel trace data calculation results
	StorageTypeTraceCal = "trace_calculate"
)

Variables

View Source
var (
	ErrorStorageType = errors.New("storage type error")
)

Functions

This section is empty.

Types

type IStorageCreator

type IStorageCreator interface {

	// SetParams Initialization parameter
	SetParams(Params)

	// GetDistributedSQL get distribution table sql
	GetDistributedSQL() (string, bool)

	// GetMergeTreeSQL get mergeTree table sql
	GetMergeTreeSQL() (string, bool)

	// GetKafkaEngineSQL get kafka engine table sql
	GetKafkaEngineSQL() (string, bool)

	// GetMaterializeViewSQL get materialized view table sql
	GetMaterializeViewSQL() (string, bool)

	// Execute SQL and return the results
	Execute(string, bool) (string, error)
}

func GetTableCreator

func GetTableCreator(storageType string) (IStorageCreator, error)

GetTableCreator Through specific types of logging library access to build table objects, obtain four different SQL statements on the basis of the process to create

type Params

type Params struct {
	IsShard   bool // isShard Does it include shard
	IsReplica bool // isReplica Does it include replica

	Cluster  string // cluster name
	Database string // database name
	Table    string // table name

	TTL int // ttl Data expiration time, unit is the day

	DB *sql.DB // clickhouse instance
}

type Storage

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

func (*Storage) Execute

func (t *Storage) Execute(sql string, isExec bool) (string, error)

func (*Storage) GetDistributedSQL

func (t *Storage) GetDistributedSQL() (string, bool)

func (*Storage) GetKafkaEngineSQL

func (t *Storage) GetKafkaEngineSQL() (string, bool)

func (*Storage) GetMaterializeViewSQL

func (t *Storage) GetMaterializeViewSQL() (string, bool)

func (*Storage) GetMergeTreeSQL

func (t *Storage) GetMergeTreeSQL() (string, bool)

func (*Storage) SetParams

func (t *Storage) SetParams(req Params)

type TraceCal

type TraceCal struct {
	Storage
}

func (*TraceCal) GetDistributedSQL

func (t *TraceCal) GetDistributedSQL() (string, bool)

GetDistributedSQL get distribution table sql

func (*TraceCal) GetKafkaEngineSQL

func (t *TraceCal) GetKafkaEngineSQL() (string, bool)

func (*TraceCal) GetMaterializeViewSQL

func (t *TraceCal) GetMaterializeViewSQL() (string, bool)

func (*TraceCal) GetMergeTreeSQL

func (t *TraceCal) GetMergeTreeSQL() (string, bool)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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