pipeline

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Destination

type Destination interface {
	io.Closer

	// Exec executes the given statement with arguments,
	// detects the given statement and pick the proper execution(sync/async) to finish the job.
	Exec(ctx context.Context, statement string, args ...any) error
}

func NewDestination

func NewDestination(ctx context.Context, addr string, opts ...Option) (Destination, error)

type Option

type Option func(db *sql.DB)

func WithConnMaxIdle

func WithConnMaxIdle(i int) Option

func WithConnMaxLife

func WithConnMaxLife(d time.Duration) Option

func WithConnMaxOpen

func WithConnMaxOpen(o int) Option

type Source

type Source interface {
	io.Closer

	Pipe(ctx context.Context, destination Destination) error
}

func NewSource

func NewSource(ctx context.Context, addr string, opts ...Option) (Source, error)

Jump to

Keyboard shortcuts

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