canal

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: AGPL-3.0, AGPL-3.0-only Imports: 31 Imported by: 0

README

基于 debezium 和 kafka 的 binlog 订阅

暂时用于处理用户密码修改。

需要 dev-env 的 mq/ 文件夹中的组件

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main() error

nolint: funlen

Types

type Msg added in v0.32.1

type Msg struct {
	ID    string
	Topic string
	Key   []byte
	Value []byte
}

type Payload added in v0.34.0

type Payload struct {
	Before json.RawMessage `json:"before"`
	After  json.RawMessage `json:"after"`
	Source source          `json:"source"`
	Op     string          `json:"op"`
}

type Stream added in v0.32.1

type Stream interface {
	Read(ctx context.Context, onMessage func(msg Msg) error) error
	// Ack(ctx context.Context, msg Msg) error
	Close() error
}

type SubjectFieldKey

type SubjectFieldKey struct {
	ID model.SubjectID `json:"field_sid"`
}

type SubjectKey

type SubjectKey struct {
	ID model.SubjectID `json:"subject_id"`
}

type UserKey

type UserKey struct {
	ID model.UserID `json:"uid"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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