dbsync

package
v0.0.0-...-9d95335 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	context.Context
	// contains filtered or unexported fields
}

func (Config) CreateQuery

func (c Config) CreateQuery(t string) string

type DbSync

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

func NewDbSync

func NewDbSync(db *sql.DB, table string, options ...Option) *DbSync

func (*DbSync) Start

func (s *DbSync) Start()

func (*DbSync) Stop

func (s *DbSync) Stop()

type Event

type Event int
const (
	EventCreate Event = iota
	EventDelete
	EventModify
)

func (Event) String

func (e Event) String() string

type Option

type Option func(*Config)

func WithContext

func WithContext(v context.Context) Option

func WithDuration

func WithDuration(v string) Option

func WithNotify

func WithNotify(f func(e Event, id, v string)) Option

func WithPk

func WithPk(v string) Option

func WithV

func WithV(v string) Option

Jump to

Keyboard shortcuts

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