producer

package
v0.0.0-...-a993ea2 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventType

type EventType string
var (
	Unknown EventType = "UNKNWON"
	Insert  EventType = "INSERT"
	Update  EventType = "UPDATE"
	Delete  EventType = "DELETE"
)

type Message

type Message struct {
	TableName string
	EventType EventType
	// key value pairs.
	// to insert, update, delete.
	Targets map[string]interface{}
}

func (*Message) TargetKeys

func (m *Message) TargetKeys() []string

func (*Message) TargetValues

func (m *Message) TargetValues() []interface{}

type Producer

type Producer interface {
	Produce([]byte) ([]*Message, error)
}

producer may return multiple messages. e.g. 1 mongo document can be nest and split to multiple tables.

Directories

Path Synopsis
source

Jump to

Keyboard shortcuts

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