watcher

package
v0.13.10 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BroadcastBulkChange

func BroadcastBulkChange(ctx context.Context, dbKey string, table string)

func BroadcastDelete

func BroadcastDelete(ctx context.Context, dbKey string, table string, pk interface{})

func BroadcastInsert

func BroadcastInsert(ctx context.Context, dbKey string, table string, pk interface{})

func BroadcastUpdate

func BroadcastUpdate(ctx context.Context, dbKey string, table string, pk interface{}, fieldKeys []string)

func MakeKey

func MakeKey(ctx context.Context, dbKey string, table string, pk interface{}) string

Types

type DefaultWatcher

type DefaultWatcher struct {
}

func (*DefaultWatcher) BroadcastBulkChange

func (w *DefaultWatcher) BroadcastBulkChange(ctx context.Context, dbKey string, table string)

func (*DefaultWatcher) BroadcastDelete

func (w *DefaultWatcher) BroadcastDelete(ctx context.Context, dbKey string, table string, pk interface{})

func (*DefaultWatcher) BroadcastInsert

func (w *DefaultWatcher) BroadcastInsert(ctx context.Context, dbKey string, table string, pk interface{})

func (*DefaultWatcher) BroadcastUpdate

func (w *DefaultWatcher) BroadcastUpdate(ctx context.Context, dbKey string, table string, pk interface{}, fieldKeys []string)

func (*DefaultWatcher) MakeKey

func (*DefaultWatcher) MakeKey(ctx context.Context, dbKey string, table string, pk interface{}) string

type WatcherI

type WatcherI interface {
	MakeKey(ctx context.Context, dbKey string, table string, pk interface{}) string
	BroadcastUpdate(ctx context.Context, dbKey string, table string, pk interface{}, fieldKeys []string)
	BroadcastInsert(ctx context.Context, dbKey string, table string, pk interface{})
	BroadcastDelete(ctx context.Context, dbKey string, table string, pk interface{})
	BroadcastBulkChange(ctx context.Context, dbKey string, table string)
}
var Watcher WatcherI

The injected watcher. See the application initialization process for Watcher creation.

Jump to

Keyboard shortcuts

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