cdc

package
v1.0.0-beta.56 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDatabaseName

func GetDatabaseName(ctx context.Context) string

Types

type DatabaseNameCtxKey

type DatabaseNameCtxKey struct{}

type Manager

type Manager struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewManager

func NewManager() *Manager

func (*Manager) GetPublisher

func (m *Manager) GetPublisher(dbName string) *Publisher

func (*Manager) OnPostCommit

func (m *Manager) OnPostCommit(_ context.Context, _ *metadata.Tenant, _ kv.EventListener) error

func (*Manager) OnPreCommit

func (m *Manager) OnPreCommit(ctx context.Context, _ *metadata.Tenant, tx transaction.Tx, events kv.EventListener) error

func (*Manager) OnRollback

func (m *Manager) OnRollback(ctx context.Context, _ *metadata.Tenant, events kv.EventListener)

func (*Manager) WrapContext

func (m *Manager) WrapContext(ctx context.Context, dbName string) context.Context

type Publisher

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

func NewPublisher

func NewPublisher(dbName string) *Publisher

func (*Publisher) NewStreamer

func (p *Publisher) NewStreamer(kvStore kv.TxStore) (*Streamer, error)

func (*Publisher) OnCommit

func (p *Publisher) OnCommit(ctx context.Context, tx transaction.Tx, listener kv.EventListener) error

func (*Publisher) OnRollback

func (p *Publisher) OnRollback(_ context.Context, _ kv.EventListener)

type PublisherKeySpace

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

func NewPublisherKeySpace

func NewPublisherKeySpace(dbName string) *PublisherKeySpace

type Streamer

type Streamer struct {
	Txs chan Tx
	// contains filtered or unexported fields
}

func (*Streamer) Close

func (s *Streamer) Close()

type Tx

type Tx struct {
	Id  []byte
	Ops []*kv.Event
}

Jump to

Keyboard shortcuts

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