sink

package
v0.0.0-...-64b8ef3 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrimitiveDecode

func PrimitiveDecode(primCfg PrimitiveConfig, v interface{}) error

func RegisterSink

func RegisterSink(tp string, f Factory)

Types

type Factory

type Factory func(name string, primCfg PrimitiveConfig, logger Logger) (Sink, error)

type Logger

type Logger interface {
	Fatalf(format string, args ...interface{})
	Panicf(format string, args ...interface{})
	Printf(format string, args ...interface{})
	Debugf(format string, args ...interface{})
	Errorf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Warnf(format string, args ...interface{})
}

type PrimitiveConfig

type PrimitiveConfig toml.Primitive

type Sink

type Sink interface {
	canal.EventHandler
	// Checkpoint will be called periodically, sink need to expose
	// it's progress and corresponding ctx, and these info will
	// be persisted in ZooKeeper
	ckp.Checkpointer

	// Initialize will be called at process start, you need to
	// recover state from the point that checkpointed last time
	Initialize(ctx context.Context, checkpoint *ckp.Checkpoint) error

	// You need to report error by this channel.
	Err() <-chan error

	Close() error
}

func NewSink

func NewSink(tp string, name string, primCfg toml.Primitive, logger Logger) (Sink, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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