elements

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: May 10, 2025 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTableAlreadyAddedToRegistry           = errors.New("table already added to registry")
	ErrTableNotFound                         = errors.New("table not found")
	ErrTableInvalid                          = errors.New("table invalid")
	ErrSubscriptionNotFound                  = errors.New("subscription not found")
	ErrColumnNotFound                        = errors.New("column not found")
	ErrTupleColumnsDifferentThanSubscription = errors.New("tuple columns different than subscription")
	ErrUnsupportedArrowToAvroTypeConversion  = errors.New("unsupported arrow to avro type conversion")
)

Functions

This section is empty.

Types

type Column

type Column struct {
	Name  string
	Dtype arrow.DataType
}

func NewColumn

func NewColumn(name string, dtype arrow.DataType) Column

func (*Column) IsValid

func (obj *Column) IsValid() bool

type ColumnPartition

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

func NewColumnPartition

func NewColumnPartition(columnName string, partitionOptions IPartitionOptions) ColumnPartition

func (ColumnPartition) Name

func (obj ColumnPartition) Name() string

func (ColumnPartition) Options

func (obj ColumnPartition) Options() IPartitionOptions

type ExternalSubscription

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

func NewExternalSubscription

func NewExternalSubscription(externalSource string, transformer Transformer, columns []Column) *ExternalSubscription

func (*ExternalSubscription) Columns

func (obj *ExternalSubscription) Columns() []Column

func (*ExternalSubscription) IsValid

func (obj *ExternalSubscription) IsValid() bool

func (*ExternalSubscription) SourceName

func (obj *ExternalSubscription) SourceName() string

func (*ExternalSubscription) Transformer

func (obj *ExternalSubscription) Transformer() Transformer

type IPartitionOptions

type IPartitionOptions interface {
	PartitionType() string
	PartitionFunc() PartitionFunc
}

type ISubscription

type ISubscription interface {
	SourceName() string
	Columns() []Column
	Transformer() Transformer
	IValidatable
}

type IValidatable

type IValidatable interface {
	IsValid() bool
}

type Partition

type Partition struct {
	TableName              string `json:"table_name"`
	SubscriptionSourceName string `json:"subscription_source_name"`
	Key                    string `json:"key"`
}

type SubscriptionGroup

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

func NewSubscriptionGroup

func NewSubscriptionGroup(name string) SubscriptionGroup

func (SubscriptionGroup) AddSubscriptions

func (obj SubscriptionGroup) AddSubscriptions(subs ...ISubscription) SubscriptionGroup

func (SubscriptionGroup) IsValid

func (obj SubscriptionGroup) IsValid() bool

func (SubscriptionGroup) Subscriptions

func (obj SubscriptionGroup) Subscriptions() []ISubscription

type Table

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

func NewTable

func NewTable(name string) *Table

func (*Table) AddColumnPartitions

func (obj *Table) AddColumnPartitions(partitions ...ColumnPartition) *Table

func (*Table) AddColumns

func (obj *Table) AddColumns(columns ...Column) *Table

func (*Table) AddSubscriptionGroups

func (obj *Table) AddSubscriptionGroups(groups ...SubscriptionGroup) *Table

func (*Table) ColumnPartitions

func (obj *Table) ColumnPartitions() []ColumnPartition

func (*Table) Columns

func (obj *Table) Columns() []Column

func (*Table) GetColumnByName

func (obj *Table) GetColumnByName(name string) (Column, error)

func (*Table) GetSubscriptionBySourceName

func (obj *Table) GetSubscriptionBySourceName(sourceName string) (ISubscription, error)

func (*Table) IsValid

func (obj *Table) IsValid() error

func (*Table) Options

func (obj *Table) Options() TableOptions

func (*Table) SetOptions

func (obj *Table) SetOptions(options TableOptions) *Table

func (*Table) SubscriptionGroups

func (obj *Table) SubscriptionGroups() []SubscriptionGroup

func (*Table) TableName

func (obj *Table) TableName() string

type TableOptions

type TableOptions struct {
	BatchProcessingDelay time.Duration
	BatchProcessingSize  int

	// partitioning options
	MaxObjectSize int
}

Jump to

Keyboard shortcuts

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