postgres

package
v0.0.0-alpha5 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INSERT = "INSERT"
	UPDATE = "UPDATE"
	DELETE = "DELETE"
)

Variables

View Source
var Event = struct {
	Entity  string
	Columns []string
}{}

Event -

Functions

This section is empty.

Types

type Notification

type Notification struct {
	Entity  string                 `json:"entity"`
	Action  string                 `json:"action"`
	OldData map[string]interface{} `json:"old_data"`
	NewData map[string]interface{} `json:"new_data"`
}

Notification -

type Option

type Option func(publisher *Publisher)

Option -.

type Publisher

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

Publisher -

func NewPublisher

func NewPublisher(ctx context.Context, url string, sl string, op string, tables []string, logger logger.Interface) (publisher *Publisher, err error)

NewPublisher -

func (*Publisher) CreateReplicationSlotServer

func (p *Publisher) CreateReplicationSlotServer(ctx context.Context) (err error)

CreateReplicationSlotServer -

func (*Publisher) Migrate

func (p *Publisher) Migrate(ctx context.Context) (err error)

Migrate -

func (*Publisher) Start

func (p *Publisher) Start()

Start -

func (*Publisher) Subscribe

func (p *Publisher) Subscribe(c chan<- *Notification)

Subscribe -

func (*Publisher) Unsubscribe

func (p *Publisher) Unsubscribe(c chan *Notification)

Unsubscribe -

Jump to

Keyboard shortcuts

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