Documentation ¶
Index ¶
- Constants
- Variables
- type CHConnConfig
- type ChColumn
- type ChTableName
- type Column
- type ColumnProperty
- type Config
- type GzipComprLevel
- type PgColumn
- type PgTableName
- func (tn PgTableName) KeyName() string
- func (tn PgTableName) MarshalYAML() (interface{}, error)
- func (tn PgTableName) NamespacedName() string
- func (tn *PgTableName) Parse(val string) error
- func (tn *PgTableName) ParseKey(key string) error
- func (tn PgTableName) String() string
- func (tn *PgTableName) UnmarshalYAML(unmarshal func(interface{}) error) error
- type Table
Constants ¶
View Source
const ( ApplicationName = "pg2ch" DefaultRowIDColumn = "row_id" TableLSNKeyPrefix = "table_lsn_" )
View Source
const ( // CollapsingMergeTree represents CollapsingMergeTree table engine CollapsingMergeTree tableEngine = iota //ReplacingMergeTree represents ReplacingMergeTree table engine ReplacingMergeTree //MergeTree represents MergeTree table engine MergeTree )
Variables ¶
View Source
var ( DefaultPostgresPort uint16 = 5432 DefaultInactivityMergeTimeout = time.Minute )
these variables could be changed in tests
Functions ¶
This section is empty.
Types ¶
type CHConnConfig ¶
type ChTableName ¶
func (ChTableName) IsEmpty ¶
func (ct ChTableName) IsEmpty() bool
func (ChTableName) String ¶
func (ct ChTableName) String() string
func (*ChTableName) UnmarshalYAML ¶
func (ct *ChTableName) UnmarshalYAML(unmarshal func(interface{}) error) error
type ColumnProperty ¶
type ColumnProperty struct { IstoreKeysSuffix string `yaml:"istore_keys_suffix"` IstoreValuesSuffix string `yaml:"istore_values_suffix"` Coalesce coalesceValue `yaml:"coalesce"` }
ColumnProperty describes column properties
type Config ¶
type Config struct { ClickHouse CHConnConfig `yaml:"clickhouse"` Postgres pgConnConfig `yaml:"postgres"` Tables map[PgTableName]*Table `yaml:"tables"` InactivityFlushTimeout time.Duration `yaml:"inactivity_flush_timeout"` PersStoragePath string `yaml:"db_path"` PersStorageType string `yaml:"db_type"` RedisBind string `yaml:"redis_bind"` PprofBind string `yaml:"pprof_bind"` SyncWorkers int `yaml:"sync_workers"` LogLevel zapcore.Level `yaml:"loglevel"` GzipBufSize int `yaml:"gzip_buffer_size"` GzipCompression GzipComprLevel `yaml:"gzip_compression"` PipeBufferSize int64 `yaml:"pipe_buffer_size"` CreateSlotMaxAttempts int `yaml:"create_slot_max_attempts"` }
Config contains config
type GzipComprLevel ¶
type GzipComprLevel int
func (GzipComprLevel) String ¶
func (gc GzipComprLevel) String() string
func (*GzipComprLevel) UnmarshalYAML ¶
func (gc *GzipComprLevel) UnmarshalYAML(unmarshal func(interface{}) error) error
func (GzipComprLevel) UseCompression ¶
func (gc GzipComprLevel) UseCompression() bool
type PgTableName ¶
PgTableName represents namespaced name
func (PgTableName) KeyName ¶
func (tn PgTableName) KeyName() string
func (PgTableName) MarshalYAML ¶
func (tn PgTableName) MarshalYAML() (interface{}, error)
func (PgTableName) NamespacedName ¶
func (tn PgTableName) NamespacedName() string
func (*PgTableName) Parse ¶
func (tn *PgTableName) Parse(val string) error
func (*PgTableName) ParseKey ¶
func (tn *PgTableName) ParseKey(key string) error
func (PgTableName) String ¶
func (tn PgTableName) String() string
func (*PgTableName) UnmarshalYAML ¶
func (tn *PgTableName) UnmarshalYAML(unmarshal func(interface{}) error) error
type Table ¶
type Table struct { ChMainTable ChTableName `yaml:"main_table"` ChSyncAuxTable ChTableName `yaml:"sync_aux_table"` IsDeletedColumn string `yaml:"is_deleted_column"` SignColumn string `yaml:"sign_column"` RowIDColumnName string `yaml:"row_id_column"` TableNameColumnName string `yaml:"table_name_column_name"` Engine tableEngine `yaml:"engine"` BufferSize int `yaml:"max_buffer_length"` InitSyncSkip bool `yaml:"init_sync_skip"` InitSyncSkipTruncate bool `yaml:"init_sync_skip_truncate"` Columns map[string]string `yaml:"columns"` ColumnProperties map[string]*ColumnProperty `yaml:"column_properties"` LsnColumnName string `yaml:"lsn_column_name"` PgOID dbtypes.OID `yaml:"-"` PgTableName PgTableName `yaml:"-"` TupleColumns []message.Column `yaml:"-"` // columns in the order they are in the table PgColumns map[string]*PgColumn `yaml:"-"` // map of pg column structs ColumnMapping map[string]ChColumn `yaml:"-"` // mapping pg column -> ch column }
Table contains information about the table
func (*Table) UnmarshalYAML ¶
UnmarshalYAML ...
Click to show internal directories.
Click to hide internal directories.