Documentation ¶
Index ¶
- Constants
- type Event
- type EventSerializationOpts
- type EventType
- type EventsHandler
- type EventsStream
- type EventsStreamOptions
- func (opts *EventsStreamOptions) WithAllTransactionEvents() *EventsStreamOptions
- func (opts *EventsStreamOptions) WithAnyEvents() *EventsStreamOptions
- func (opts *EventsStreamOptions) WithConfigNamespace() *EventsStreamOptions
- func (opts *EventsStreamOptions) WithDBName() *EventsStreamOptions
- func (opts *EventsStreamOptions) WithDocModifyEvents() *EventsStreamOptions
- func (opts *EventsStreamOptions) WithEvents(types ...EventType) *EventsStreamOptions
- func (opts *EventsStreamOptions) WithIndexModifyEvents() *EventsStreamOptions
- func (opts *EventsStreamOptions) WithLSN() *EventsStreamOptions
- func (opts *EventsStreamOptions) WithNamespaceOperationEvents() *EventsStreamOptions
- func (opts *EventsStreamOptions) WithNamespacesList(namespaces ...string) *EventsStreamOptions
- func (opts *EventsStreamOptions) WithServerID() *EventsStreamOptions
- func (opts *EventsStreamOptions) WithShardID() *EventsStreamOptions
- func (opts *EventsStreamOptions) WithTimestamp() *EventsStreamOptions
- func (opts *EventsStreamOptions) WithTransactionCommitEvents() *EventsStreamOptions
- type LsnT
Constants ¶
const ( // Data modification events EventTypeItemUpdate = EventType(bindings.EventTypeItemUpdate) EventTypeItemUpsert = EventType(bindings.EventTypeItemUpsert) EventTypeItemDelete = EventType(bindings.EventTypeItemDelete) EventTypeItemInsert = EventType(bindings.EventTypeItemInsert) EventTypeTruncate = EventType(bindings.EventTypeTruncate) EventTypePutMeta = EventType(bindings.EventTypePutMeta) EventTypeDeleteMeta = EventType(bindings.EventTypeDeleteMeta) // Index modification events EventTypeIndexAdd = EventType(bindings.EventTypeIndexAdd) EventTypeIndexDrop = EventType(bindings.EventTypeIndexDrop) EventTypeIndexUpdate = EventType(bindings.EventTypeIndexUpdate) // Transaction events EventTypeBeginTx = EventType(bindings.EventTypeBeginTx) EventTypeCommitTx = EventType(bindings.EventTypeCommitTx) EventTypeItemUpdateTx = EventType(bindings.EventTypeItemUpdateTx) EventTypeItemUpsertTx = EventType(bindings.EventTypeItemUpsertTx) EventTypeItemDeleteTx = EventType(bindings.EventTypeItemDeleteTx) EventTypeItemInsertTx = EventType(bindings.EventTypeItemInsertTx) EventTypePutMetaTx = EventType(bindings.EventTypePutMetaTx) EventTypeUpdateQuery = EventType(bindings.EventTypeUpdateQuery) EventTypeDeleteQuery = EventType(bindings.EventTypeDeleteQuery) EventTypeUpdateQueryTx = EventType(bindings.EventTypeUpdateQueryTx) EventTypeDeleteQueryTx = EventType(bindings.EventTypeDeleteQueryTx) // Schema setting EventTypeSetSchema = EventType(bindings.EventTypeSetSchema) // Namespace operation events EventTypeAddNamespace = EventType(bindings.EventTypeAddNamespace) EventTypeDropNamespace = EventType(bindings.EventTypeDropNamespace) EventTypeCloseNamespace = EventType(bindings.EventTypeCloseNamespace) EventTypeRenameNamespace = EventType(bindings.EventTypeRenameNamespace) // Replication sync events EventTypeNamespaceSync = EventType(bindings.EventTypeResyncNamespaceGeneric) EventTypeNamespaceSyncOnLeaderInit = EventType(bindings.EventTypeResyncNamespaceLeaderInit) // Updates queue overflow event EventTypeUpdatesDrop = EventType(bindings.EventTypeResyncOnUpdatesDrop) // Internal system events EventTypeNone = EventType(bindings.EventTypeNone) EventTypeEmptyUpdate = EventType(bindings.EventTypeEmptyUpdate) EventTypeNodeNetworkCheck = EventType(bindings.EventTypeNodeNetworkCheck) EventTypeSetTagsMatcher = EventType(bindings.EventTypeSetTagsMatcher) EventTypeSetTagsMatcherTx = EventType(bindings.EventTypeSetTagsMatcherTx) EventTypeSaveShardingConfig = EventType(bindings.EventTypeSaveShardingConfig) EventTypeApplyShardingConfig = EventType(bindings.EventTypeApplyShardingConfig) EventTypeResetOldShardingConfig = EventType(bindings.EventTypeResetOldShardingConfig) EventTypeResetCandidateConfig = EventType(bindings.EventTypeResetCandidateConfig) EventTypeRollbackCandidateConfig = EventType(bindings.EventTypeRollbackCandidateConfig) )
Reindexer event types
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
// contains filtered or unexported fields
}
func (*Event) NamespaceVersion ¶
NamespaceVersion - source namespace version
type EventSerializationOpts ¶
type EventsHandler ¶
type EventsHandler struct {
// contains filtered or unexported fields
}
func NewEventsHandler ¶
func NewEventsHandler(owner bindings.RawBinding) *EventsHandler
func (*EventsHandler) CreateStream ¶
func (eh *EventsHandler) CreateStream(ctx context.Context, opts *EventsStreamOptions) *EventsStream
func (*EventsHandler) OnError ¶
func (eh *EventsHandler) OnError(e error) error
type EventsStream ¶
type EventsStream struct {
// contains filtered or unexported fields
}
func (*EventsStream) Chan ¶
func (es *EventsStream) Chan() chan *Event
Chan - returns events channel. It will be closed in case of errors, do not close it from the user's code
func (*EventsStream) Close ¶
func (es *EventsStream) Close(ctx context.Context) error
Close must be called to finalize stream correctly
func (*EventsStream) Error ¶
func (es *EventsStream) Error() error
Error - return current stream error
type EventsStreamOptions ¶
type EventsStreamOptions struct {
// contains filtered or unexported fields
}
func DefaultEventsStreamOptions ¶
func DefaultEventsStreamOptions() *EventsStreamOptions
DefaultSubscriptionOptions return default subscription opts
func (*EventsStreamOptions) WithAllTransactionEvents ¶
func (opts *EventsStreamOptions) WithAllTransactionEvents() *EventsStreamOptions
Enable full transactions events set (beginTx, all internal tx records and commit)
func (*EventsStreamOptions) WithAnyEvents ¶
func (opts *EventsStreamOptions) WithAnyEvents() *EventsStreamOptions
Enable all possible events
func (*EventsStreamOptions) WithConfigNamespace ¶
func (opts *EventsStreamOptions) WithConfigNamespace() *EventsStreamOptions
Enable events from #config-namespace
func (*EventsStreamOptions) WithDBName ¶
func (opts *EventsStreamOptions) WithDBName() *EventsStreamOptions
If set, each event will contain source database name This option is for the future development, when cluster subscription will be implemented
func (*EventsStreamOptions) WithDocModifyEvents ¶
func (opts *EventsStreamOptions) WithDocModifyEvents() *EventsStreamOptions
Enable documents modification events (except transaction records)
func (*EventsStreamOptions) WithEvents ¶
func (opts *EventsStreamOptions) WithEvents(types ...EventType) *EventsStreamOptions
Add custom events set
func (*EventsStreamOptions) WithIndexModifyEvents ¶
func (opts *EventsStreamOptions) WithIndexModifyEvents() *EventsStreamOptions
Enable index modification events
func (*EventsStreamOptions) WithLSN ¶
func (opts *EventsStreamOptions) WithLSN() *EventsStreamOptions
If set, each event will contain record's LSN
func (*EventsStreamOptions) WithNamespaceOperationEvents ¶
func (opts *EventsStreamOptions) WithNamespaceOperationEvents() *EventsStreamOptions
Enable namespaces modification events (add, drop, rename)
func (*EventsStreamOptions) WithNamespacesList ¶
func (opts *EventsStreamOptions) WithNamespacesList(namespaces ...string) *EventsStreamOptions
Set target subscription namespaces to recieve events from
func (*EventsStreamOptions) WithServerID ¶
func (opts *EventsStreamOptions) WithServerID() *EventsStreamOptions
If set, each event will contain server ID of the emmiter node
func (*EventsStreamOptions) WithShardID ¶
func (opts *EventsStreamOptions) WithShardID() *EventsStreamOptions
If set, each event will contain shard ID of the emmiter node
func (*EventsStreamOptions) WithTimestamp ¶
func (opts *EventsStreamOptions) WithTimestamp() *EventsStreamOptions
If set, each event will contain creation timestamp
func (*EventsStreamOptions) WithTransactionCommitEvents ¶
func (opts *EventsStreamOptions) WithTransactionCommitEvents() *EventsStreamOptions
Enable transactions commit events