Documentation ¶
Index ¶
- Constants
- type CleanupEvent
- type ColumnValues
- type DefaultDeleteEvent
- func (event *DefaultDeleteEvent) AddOldValue(value base.Value) error
- func (event *DefaultDeleteEvent) OldValue(i int) base.Value
- func (event *DefaultDeleteEvent) OldValuesCount() int
- func (event *DefaultDeleteEvent) Table() base.Table
- func (event *DefaultDeleteEvent) ToOldChangeItem() (*abstract.ChangeItem, error)
- type DefaultInsertEvent
- func (event *DefaultInsertEvent) AddNewValue(value base.Value) error
- func (event *DefaultInsertEvent) NewValue(i int) (base.Value, error)
- func (event *DefaultInsertEvent) NewValuesCount() int
- func (event *DefaultInsertEvent) Table() base.Table
- func (event *DefaultInsertEvent) ToOldChangeItem() (*abstract.ChangeItem, error)
- type DefaultLoggedDeleteEvent
- type DefaultLoggedInsertEvent
- type DefaultLoggedUpdateEvent
- type DefaultTableLoadEvent
- func (event *DefaultTableLoadEvent) State() TableLoadState
- func (event *DefaultTableLoadEvent) String() string
- func (event *DefaultTableLoadEvent) Table() base.Table
- func (event *DefaultTableLoadEvent) ToOldChangeItem() (*abstract.ChangeItem, error)
- func (event *DefaultTableLoadEvent) WithPart(part string) *DefaultTableLoadEvent
- type DefaultTransactionEvent
- type DefaultTransactionalDeleteEvent
- func NewDefaultTransactionalDeleteEvent(table base.Table, position base.LogPosition, transaction base.Transaction) *DefaultTransactionalDeleteEvent
- func NewDefaultTransactionalDeleteEventWithValues(table base.Table, position base.LogPosition, transaction base.Transaction, ...) (*DefaultTransactionalDeleteEvent, error)
- type DefaultTransactionalInsertEvent
- func NewDefaultTransactionalInsertEvent(table base.Table, position base.LogPosition, transaction base.Transaction) *DefaultTransactionalInsertEvent
- func NewDefaultTransactionalInsertEventWithValues(table base.Table, position base.LogPosition, transaction base.Transaction, ...) (*DefaultTransactionalInsertEvent, error)
- type DefaultTransactionalUpdateEvent
- func NewDefaultTransactionalUpdateEvent(table base.Table, position base.LogPosition, transaction base.Transaction) *DefaultTransactionalUpdateEvent
- func NewDefaultTransactionalUpdateEventWithValues(table base.Table, position base.LogPosition, transaction base.Transaction, ...) (*DefaultTransactionalUpdateEvent, error)
- type DefaultUpdateEvent
- func (event *DefaultUpdateEvent) AddNewValue(value base.Value) error
- func (event *DefaultUpdateEvent) AddOldValue(value base.Value) error
- func (event *DefaultUpdateEvent) NewValue(i int) base.Value
- func (event *DefaultUpdateEvent) NewValuesCount() int
- func (event *DefaultUpdateEvent) OldValue(i int) base.Value
- func (event *DefaultUpdateEvent) OldValuesCount() int
- func (event *DefaultUpdateEvent) Table() base.Table
- func (event *DefaultUpdateEvent) ToOldChangeItem() (*abstract.ChangeItem, error)
- type DeleteEvent
- type InsertBuilder
- type InsertEvent
- type LoggedDeleteEvent
- type LoggedInsertEvent
- type LoggedUpdateEvent
- type RowBuilder
- type SynchronizeEvent
- type TableEventsBuilder
- type TableLoadEvent
- type TableLoadState
- type TransactionEvent
- type TransactionState
- type TransactionalDeleteEvent
- type TransactionalInsertEvent
- type TransactionalUpdateEvent
- type UpdateEvent
Constants ¶
View Source
const ( InitShardedTableLoad = TableLoadState(4) TableLoadBegin = TableLoadState(1) TableLoadEnd = TableLoadState(2) DoneShardedTableLoad = TableLoadState(3) )
It is important for serialization not to use iota
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CleanupEvent ¶
TODO: Remove after new cleanup design based on TableLoadEvents
func (*CleanupEvent) String ¶
func (c *CleanupEvent) String() string
type DefaultDeleteEvent ¶
type DefaultDeleteEvent struct {
// contains filtered or unexported fields
}
func NewDefaultDeleteEvent ¶
func NewDefaultDeleteEvent(table base.Table) *DefaultDeleteEvent
func (*DefaultDeleteEvent) AddOldValue ¶
func (event *DefaultDeleteEvent) AddOldValue(value base.Value) error
func (*DefaultDeleteEvent) OldValuesCount ¶
func (event *DefaultDeleteEvent) OldValuesCount() int
func (*DefaultDeleteEvent) Table ¶
func (event *DefaultDeleteEvent) Table() base.Table
func (*DefaultDeleteEvent) ToOldChangeItem ¶
func (event *DefaultDeleteEvent) ToOldChangeItem() (*abstract.ChangeItem, error)
type DefaultInsertEvent ¶
type DefaultInsertEvent struct {
// contains filtered or unexported fields
}
func NewDefaultInsertEvent ¶
func NewDefaultInsertEvent(table base.Table) *DefaultInsertEvent
func (*DefaultInsertEvent) AddNewValue ¶
func (event *DefaultInsertEvent) AddNewValue(value base.Value) error
func (*DefaultInsertEvent) NewValue ¶
func (event *DefaultInsertEvent) NewValue(i int) (base.Value, error)
func (*DefaultInsertEvent) NewValuesCount ¶
func (event *DefaultInsertEvent) NewValuesCount() int
func (*DefaultInsertEvent) Table ¶
func (event *DefaultInsertEvent) Table() base.Table
func (*DefaultInsertEvent) ToOldChangeItem ¶
func (event *DefaultInsertEvent) ToOldChangeItem() (*abstract.ChangeItem, error)
type DefaultLoggedDeleteEvent ¶
type DefaultLoggedDeleteEvent struct { DefaultDeleteEvent // contains filtered or unexported fields }
func NewDefaultLoggedDeleteEvent ¶
func NewDefaultLoggedDeleteEvent( table base.Table, position base.LogPosition, ) *DefaultLoggedDeleteEvent
func NewDefaultLoggedDeleteEventWithValues ¶
func NewDefaultLoggedDeleteEventWithValues( table base.Table, position base.LogPosition, oldValues []base.Value, ) (*DefaultLoggedDeleteEvent, error)
func (*DefaultLoggedDeleteEvent) Position ¶
func (event *DefaultLoggedDeleteEvent) Position() base.LogPosition
func (*DefaultLoggedDeleteEvent) ToOldChangeItem ¶
func (event *DefaultLoggedDeleteEvent) ToOldChangeItem() (*abstract.ChangeItem, error)
type DefaultLoggedInsertEvent ¶
type DefaultLoggedInsertEvent struct { DefaultInsertEvent // contains filtered or unexported fields }
func NewDefaultLoggedInsertEvent ¶
func NewDefaultLoggedInsertEvent( table base.Table, position base.LogPosition, ) *DefaultLoggedInsertEvent
func NewDefaultLoggedInsertEventWithValues ¶
func NewDefaultLoggedInsertEventWithValues( table base.Table, position base.LogPosition, newValues []base.Value, ) (*DefaultLoggedInsertEvent, error)
func (*DefaultLoggedInsertEvent) Position ¶
func (event *DefaultLoggedInsertEvent) Position() base.LogPosition
func (*DefaultLoggedInsertEvent) ToOldChangeItem ¶
func (event *DefaultLoggedInsertEvent) ToOldChangeItem() (*abstract.ChangeItem, error)
type DefaultLoggedUpdateEvent ¶
type DefaultLoggedUpdateEvent struct { DefaultUpdateEvent // contains filtered or unexported fields }
func NewDefaultLoggedUpdateEvent ¶
func NewDefaultLoggedUpdateEvent( table base.Table, position base.LogPosition, ) *DefaultLoggedUpdateEvent
func NewDefaultLoggedUpdateEventWithValues ¶
func NewDefaultLoggedUpdateEventWithValues( table base.Table, position base.LogPosition, newValues []base.Value, oldValues []base.Value, ) (*DefaultLoggedUpdateEvent, error)
func (*DefaultLoggedUpdateEvent) Position ¶
func (event *DefaultLoggedUpdateEvent) Position() base.LogPosition
func (*DefaultLoggedUpdateEvent) ToOldChangeItem ¶
func (event *DefaultLoggedUpdateEvent) ToOldChangeItem() (*abstract.ChangeItem, error)
type DefaultTableLoadEvent ¶
type DefaultTableLoadEvent struct {
// contains filtered or unexported fields
}
func NewDefaultTableLoadEvent ¶
func NewDefaultTableLoadEvent(table base.Table, state TableLoadState) *DefaultTableLoadEvent
func (*DefaultTableLoadEvent) State ¶
func (event *DefaultTableLoadEvent) State() TableLoadState
func (*DefaultTableLoadEvent) String ¶
func (event *DefaultTableLoadEvent) String() string
func (*DefaultTableLoadEvent) Table ¶
func (event *DefaultTableLoadEvent) Table() base.Table
func (*DefaultTableLoadEvent) ToOldChangeItem ¶
func (event *DefaultTableLoadEvent) ToOldChangeItem() (*abstract.ChangeItem, error)
func (*DefaultTableLoadEvent) WithPart ¶
func (event *DefaultTableLoadEvent) WithPart(part string) *DefaultTableLoadEvent
type DefaultTransactionEvent ¶
type DefaultTransactionEvent struct {
// contains filtered or unexported fields
}
func NewDefaultTransactionEvent ¶
func NewDefaultTransactionEvent(position base.LogPosition, transaction base.Transaction, state TransactionState) *DefaultTransactionEvent
func (*DefaultTransactionEvent) Position ¶
func (event *DefaultTransactionEvent) Position() base.LogPosition
func (*DefaultTransactionEvent) State ¶
func (event *DefaultTransactionEvent) State() TransactionState
func (*DefaultTransactionEvent) Transaction ¶
func (event *DefaultTransactionEvent) Transaction() base.Transaction
type DefaultTransactionalDeleteEvent ¶
type DefaultTransactionalDeleteEvent struct { DefaultLoggedDeleteEvent // contains filtered or unexported fields }
func NewDefaultTransactionalDeleteEvent ¶
func NewDefaultTransactionalDeleteEvent( table base.Table, position base.LogPosition, transaction base.Transaction, ) *DefaultTransactionalDeleteEvent
func NewDefaultTransactionalDeleteEventWithValues ¶
func NewDefaultTransactionalDeleteEventWithValues( table base.Table, position base.LogPosition, transaction base.Transaction, oldValues []base.Value, ) (*DefaultTransactionalDeleteEvent, error)
func (*DefaultTransactionalDeleteEvent) ToOldChangeItem ¶
func (event *DefaultTransactionalDeleteEvent) ToOldChangeItem() (*abstract.ChangeItem, error)
func (*DefaultTransactionalDeleteEvent) Transaction ¶
func (event *DefaultTransactionalDeleteEvent) Transaction() base.Transaction
type DefaultTransactionalInsertEvent ¶
type DefaultTransactionalInsertEvent struct { DefaultLoggedInsertEvent // contains filtered or unexported fields }
func NewDefaultTransactionalInsertEvent ¶
func NewDefaultTransactionalInsertEvent( table base.Table, position base.LogPosition, transaction base.Transaction, ) *DefaultTransactionalInsertEvent
func NewDefaultTransactionalInsertEventWithValues ¶
func NewDefaultTransactionalInsertEventWithValues( table base.Table, position base.LogPosition, transaction base.Transaction, newValues []base.Value, ) (*DefaultTransactionalInsertEvent, error)
func (*DefaultTransactionalInsertEvent) ToOldChangeItem ¶
func (event *DefaultTransactionalInsertEvent) ToOldChangeItem() (*abstract.ChangeItem, error)
func (*DefaultTransactionalInsertEvent) Transaction ¶
func (event *DefaultTransactionalInsertEvent) Transaction() base.Transaction
type DefaultTransactionalUpdateEvent ¶
type DefaultTransactionalUpdateEvent struct { DefaultLoggedUpdateEvent // contains filtered or unexported fields }
func NewDefaultTransactionalUpdateEvent ¶
func NewDefaultTransactionalUpdateEvent( table base.Table, position base.LogPosition, transaction base.Transaction, ) *DefaultTransactionalUpdateEvent
func NewDefaultTransactionalUpdateEventWithValues ¶
func NewDefaultTransactionalUpdateEventWithValues( table base.Table, position base.LogPosition, transaction base.Transaction, newValues []base.Value, oldValues []base.Value, ) (*DefaultTransactionalUpdateEvent, error)
func (*DefaultTransactionalUpdateEvent) ToOldChangeItem ¶
func (event *DefaultTransactionalUpdateEvent) ToOldChangeItem() (*abstract.ChangeItem, error)
func (*DefaultTransactionalUpdateEvent) Transaction ¶
func (event *DefaultTransactionalUpdateEvent) Transaction() base.Transaction
type DefaultUpdateEvent ¶
type DefaultUpdateEvent struct {
// contains filtered or unexported fields
}
func NewDefaultUpdateEvent ¶
func NewDefaultUpdateEvent(table base.Table) *DefaultUpdateEvent
func (*DefaultUpdateEvent) AddNewValue ¶
func (event *DefaultUpdateEvent) AddNewValue(value base.Value) error
func (*DefaultUpdateEvent) AddOldValue ¶
func (event *DefaultUpdateEvent) AddOldValue(value base.Value) error
func (*DefaultUpdateEvent) NewValuesCount ¶
func (event *DefaultUpdateEvent) NewValuesCount() int
func (*DefaultUpdateEvent) OldValuesCount ¶
func (event *DefaultUpdateEvent) OldValuesCount() int
func (*DefaultUpdateEvent) Table ¶
func (event *DefaultUpdateEvent) Table() base.Table
func (*DefaultUpdateEvent) ToOldChangeItem ¶
func (event *DefaultUpdateEvent) ToOldChangeItem() (*abstract.ChangeItem, error)
type DeleteEvent ¶
type InsertBuilder ¶
type InsertBuilder interface { Column(colName string, val interface{}) InsertBuilder Build() (InsertEvent, error) FromMap(record map[string]interface{}) InsertBuilder }
func NewDefaultInsertBuilder ¶
func NewDefaultInsertBuilder(table base.Table) InsertBuilder
type InsertEvent ¶
type LoggedDeleteEvent ¶
type LoggedDeleteEvent interface { base.LoggedEvent DeleteEvent }
type LoggedInsertEvent ¶
type LoggedInsertEvent interface { base.LoggedEvent InsertEvent }
type LoggedUpdateEvent ¶
type LoggedUpdateEvent interface { base.LoggedEvent UpdateEvent }
type RowBuilder ¶
type SynchronizeEvent ¶
type SynchronizeEvent interface { base.Event base.SupportsOldChangeItem }
func NewDefaultSynchronizeEvent ¶
func NewDefaultSynchronizeEvent(tbl base.Table, partID string) SynchronizeEvent
type TableEventsBuilder ¶
type TableEventsBuilder interface { AddRow() RowBuilder AsBatch() base.EventBatch }
func NewTableEventsBuilder ¶
func NewTableEventsBuilder(table base.Table) TableEventsBuilder
type TableLoadEvent ¶
type TableLoadEvent interface { base.Event base.SupportsOldChangeItem Table() base.Table State() TableLoadState }
type TableLoadState ¶
type TableLoadState int
func (TableLoadState) String ¶
func (s TableLoadState) String() string
type TransactionEvent ¶
type TransactionEvent interface { base.TransactionalEvent State() TransactionState }
type TransactionState ¶
type TransactionState int
const ( TransactionBegin TransactionState = TransactionState(1) TransactionCommit TransactionState = TransactionState(2) )
It is important for serialization not to use iota
type TransactionalDeleteEvent ¶
type TransactionalDeleteEvent interface { base.TransactionalEvent LoggedDeleteEvent }
type TransactionalInsertEvent ¶
type TransactionalInsertEvent interface { base.TransactionalEvent LoggedInsertEvent }
type TransactionalUpdateEvent ¶
type TransactionalUpdateEvent interface { base.TransactionalEvent LoggedUpdateEvent }
Click to show internal directories.
Click to hide internal directories.