watcher

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2020 License: MIT Imports: 2 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 string)

func BroadcastInsert

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

func BroadcastUpdate

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

func MakeKey

func MakeKey(ctx context.Context, dbKey string, table string, pk string) 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 string)

func (*DefaultWatcher) BroadcastInsert

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

func (*DefaultWatcher) BroadcastUpdate

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

func (*DefaultWatcher) MakeKey

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

type WatcherI

type WatcherI interface {
	MakeKey(ctx context.Context, dbKey string, table string, pk string) string
	BroadcastUpdate(ctx context.Context, dbKey string, table string, pk string, fieldKeys []string)
	BroadcastInsert(ctx context.Context, dbKey string, table string, pk string)
	BroadcastDelete(ctx context.Context, dbKey string, table string, pk string)
	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