types

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package types is a general models for ch-rollup.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColumnSetting

type ColumnSetting struct {
	Name         string // The name of the column.
	IsRollUpTime bool   // (Optional) A boolean indicating if this column is used as the time reference for roll up.
	Expression   string // (Optional) The expression used to calculate value for the column. Example: 'countMergeState(counter)'
}

ColumnSetting defines settings for a specific column.

func (*ColumnSetting) Validate

func (cs *ColumnSetting) Validate() error

Validate ColumnSetting.

type RollUpSetting

type RollUpSetting struct {
	After          time.Duration   // The time duration after which the roll up interval applies.
	Interval       time.Duration   // The roll up interval duration.
	ColumnSettings []ColumnSetting // A slice of column configuration objects that override the top-level column settings for the specified interval.
}

RollUpSetting defines a specific roll up interval and the columns affected during that interval.

func (*RollUpSetting) Validate

func (rs *RollUpSetting) Validate(rollUpTimeColumnName string) error

Validate RollUpSetting.

type Task

type Task struct {
	Database       string          // The name of the database where the table resides.
	Table          string          // The name of the table to be configured.
	PartitionKey   time.Duration   // The key used for partitioning data, typically representing a time interval.
	CopyInterval   time.Duration   // This is the interval that will be used when copying data. Default: '1h'.
	RollUpSettings []RollUpSetting // A slice of settings defining roll up intervals and specific column configurations for those intervals.
	ColumnSettings []ColumnSetting // A slice of column configuration objects that define how data is grouped and aggregated.
}

Task ...

func (*Task) Validate

func (t *Task) Validate() error

Validate Task.

type Tasks

type Tasks []Task

Tasks ...

func (Tasks) Validate

func (t Tasks) Validate() error

Validate Tasks.

Jump to

Keyboard shortcuts

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