forwarder

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPollingInterval = 100 * time.Millisecond

Variables

View Source
var DefaultOptions = &Options{
	PollingInterval: DefaultPollingInterval,
	Serializer:      serialization.NewProtobufSerializer(),
	OutboxTableName: "event_outbox",
}

Functions

This section is empty.

Types

type DBForwarder

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

func New

func New(db db.DB, bus bus.Bus, options *Options) (*DBForwarder, error)

func (*DBForwarder) Start

func (fw *DBForwarder) Start(ctx context.Context) error

func (*DBForwarder) Stop

func (fw *DBForwarder) Stop() error

type DebeziumForwarder added in v0.16.0

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

func NewDebeziumForwarder added in v0.16.0

func NewDebeziumForwarder(db db.DB, bus bus.Bus, options *DebeziumOptions) (*DebeziumForwarder, error)

func (*DebeziumForwarder) Start added in v0.16.0

func (fw *DebeziumForwarder) Start(ctx context.Context) error

func (*DebeziumForwarder) Stop added in v0.16.0

func (fw *DebeziumForwarder) Stop() error

type DebeziumMessage added in v0.16.0

type DebeziumMessage struct {
	Payload struct {
		Before interface{} `json:"before"`
		After  struct {
			ID        string `json:"id"`
			Topic     string `json:"topic"`
			Payload   []byte `json:"payload"`
			CreatedAt int64  `json:"created_at"`
		} `json:"after"`
		Source struct {
			Version   string      `json:"version"`
			Connector string      `json:"connector"`
			Name      string      `json:"name"`
			TsMs      int64       `json:"ts_ms"`
			Snapshot  string      `json:"snapshot"`
			Db        string      `json:"db"`
			Sequence  interface{} `json:"sequence"`
			TsUs      int64       `json:"ts_us"`
			TsNs      int64       `json:"ts_ns"`
			Table     string      `json:"table"`
			ServerID  int         `json:"server_id"`
			Gtid      interface{} `json:"gtid"`
			File      string      `json:"file"`
			Pos       int         `json:"pos"`
			Row       int         `json:"row"`
			Thread    int         `json:"thread"`
			Query     interface{} `json:"query"`
		} `json:"source"`
		Transaction interface{} `json:"transaction"`
		Op          string      `json:"op"`
		TsMs        int64       `json:"ts_ms"`
		TsUs        int64       `json:"ts_us"`
		TsNs        int64       `json:"ts_ns"`
	} `json:"payload"`
}

type DebeziumOptions added in v0.16.0

type DebeziumOptions struct {
	Serializer      serialization.Serializer
	DebeziumStream  string
	DebeziumSubject string
	SubscriberName  string
	Logger          *zap.Logger
}

type Forwarder added in v0.16.0

type Forwarder interface {
	Stop() error
	Start(ctx context.Context) error
}

type Options

type Options struct {
	PollingInterval time.Duration
	Serializer      serialization.Serializer
	OutboxTableName string
	Logger          *zap.Logger
}

Jump to

Keyboard shortcuts

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