Documentation
¶
Index ¶
- type BatchBuilder
- type ClickhouseFieldRaw
- type ClickhouseInsertJob
- type ClickhouseInsertJobRaw
- type ConstantValue
- type RandomArray
- type RandomFloat
- type RandomInteger
- type RandomMap
- type RandomSet
- type RandomString
- type RandomTimestamp
- type Sequence
- type SequenceSet
- type SequentialTimestamp
- type StructValue
- type Timestamp
- type UUIDGenerator
- type Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchBuilder ¶
type BatchBuilder struct {
// contains filtered or unexported fields
}
func NewBatchBuilder ¶
func NewBatchBuilder(rowBuilder StructValue, batchSize uint64) *BatchBuilder
func (*BatchBuilder) BuildBatch ¶
func (builder *BatchBuilder) BuildBatch() []map[string]interface{}
type ClickhouseFieldRaw ¶
type ClickhouseInsertJob ¶
type ClickhouseInsertJob struct { // Size of each batch to build BatchSize int64 TableName string PartitionId int Partitions int Schema StructValue }
type ClickhouseInsertJobRaw ¶
type ClickhouseInsertJobRaw struct { BatchSize int64 `json:"batchSize"` TableName string `json:"tableName"` Partitions int `json:"partitions"` PartitionId int `json:"partitionId"` Config map[string]ClickhouseFieldRaw `json:"config"` }
func (*ClickhouseInsertJobRaw) Into ¶
func (raw *ClickhouseInsertJobRaw) Into(result *ClickhouseInsertJob) error
type ConstantValue ¶
type ConstantValue struct {
// contains filtered or unexported fields
}
This value always returns the same value
func NewConst ¶
func NewConst( value interface{}, ) *ConstantValue
func NewConstFromConfig ¶
func NewConstFromConfig(config interface{}) (*ConstantValue, error)
func (*ConstantValue) GetValue ¶
func (constant *ConstantValue) GetValue( sequence uint64, ) interface{}
type RandomArray ¶
type RandomArray struct {
// contains filtered or unexported fields
}
Array
func NewRandomArrayFromConfig ¶
func NewRandomArrayFromConfig(config interface{}, valueProvider Value) (*RandomArray, error)
func (*RandomArray) GetValue ¶
func (rnd *RandomArray) GetValue( sequence uint64, ) interface{}
type RandomFloat ¶
type RandomFloat struct {
// contains filtered or unexported fields
}
func NewRandomFloatFromConfig ¶
func NewRandomFloatFromConfig(config interface{}) (*RandomFloat, error)
func (*RandomFloat) GetValue ¶
func (rnd *RandomFloat) GetValue( sequence uint64, ) interface{}
type RandomInteger ¶
type RandomInteger struct {
// contains filtered or unexported fields
}
func NewRandomIntegerFromConfig ¶
func NewRandomIntegerFromConfig(config interface{}) (*RandomInteger, error)
func (*RandomInteger) GetValue ¶
func (rnd *RandomInteger) GetValue( sequence uint64, ) interface{}
type RandomMap ¶
type RandomMap struct {
// contains filtered or unexported fields
}
Map
func NewRandomMapFromConfig ¶
type RandomSet ¶
type RandomSet struct {
// contains filtered or unexported fields
}
Discrete values
func NewRandomSetFromConfig ¶
type RandomString ¶
type RandomString struct {
// contains filtered or unexported fields
}
func NewRandomStringFromConfig ¶
func NewRandomStringFromConfig(config interface{}) (*RandomString, error)
func (*RandomString) GetValue ¶
func (rnd *RandomString) GetValue( sequence uint64, ) interface{}
type RandomTimestamp ¶
type RandomTimestamp struct {
// contains filtered or unexported fields
}
RandomTimestamp
func NewRandomTimestampFromConfig ¶
func NewRandomTimestampFromConfig(config interface{}) (*RandomTimestamp, error)
func (*RandomTimestamp) GetValue ¶
func (rt *RandomTimestamp) GetValue(sequence uint64) interface{}
type SequenceSet ¶
type SequenceSet struct {
// contains filtered or unexported fields
}
func NewSequenceSetFromConfig ¶
func NewSequenceSetFromConfig(config interface{}) (*SequenceSet, error)
func (*SequenceSet) GetValue ¶
func (seq *SequenceSet) GetValue( sequence uint64, ) interface{}
type SequentialTimestamp ¶
type SequentialTimestamp struct {
// contains filtered or unexported fields
}
SequentialTimestamp
func NewSequentialTimestampFromConfig ¶
func NewSequentialTimestampFromConfig(config interface{}) (*SequentialTimestamp, error)
func (*SequentialTimestamp) GetValue ¶
func (seq *SequentialTimestamp) GetValue(sequence uint64) interface{}
type StructValue ¶
type StructValue struct {
// contains filtered or unexported fields
}
func NewStructFromConfig ¶
func NewStructFromConfig( config map[string]ClickhouseFieldRaw, partitions int, partition_id int, ) (*StructValue, error)
func NewStructValue ¶
func NewStructValue( builders map[string]Value, flattened []StructValue, ) *StructValue
func (*StructValue) GetValue ¶
func (structValue *StructValue) GetValue( sequence uint64, ) map[string]interface{}
type Timestamp ¶
type Timestamp struct {
// contains filtered or unexported fields
}
Timestamp
func NewTimestampFromConfig ¶
type UUIDGenerator ¶
type UUIDGenerator struct{}
UUID
func (*UUIDGenerator) GetValue ¶
func (seq *UUIDGenerator) GetValue( sequence uint64, ) interface{}
type Value ¶
type Value interface {
GetValue(sequence uint64) interface{}
}
Basic interface that produces a value
func BuildField ¶
func BuildField(config ClickhouseFieldRaw, partitions int, partition_id int) (Value, error)
Click to show internal directories.
Click to hide internal directories.