plugin

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTransactionAlreadyInProgress = errors.New("plugin: transaction already in progress")
	ErrTransactionAlreadyClosed     = errors.New("plugin: transaction already committed or rolled back")
)

Functions

This section is empty.

Types

type Option

type Option func(*SQLDriver)

Option

func WithArgs

func WithArgs(args ...string) Option

WithEnv

func WithEnv

func WithEnv(envs ...string) Option

WithEnv

func WithPrefix

func WithPrefix(prefix string) Option

WithPrefix allows users to customize the binary name prefix for plugins.

type SQLDriver

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

SQLDriver

func NewDriver

func NewDriver(name string, opts ...Option) *SQLDriver

NewDriver

func (*SQLDriver) Close

func (d *SQLDriver) Close() error

Close will clean up by waiting for the plugin process to shutdown.

func (*SQLDriver) Connect

func (d *SQLDriver) Connect(ctx context.Context) (driver.Conn, error)

Connect

func (*SQLDriver) Driver

func (d *SQLDriver) Driver() driver.Driver

Driver returns nil as SQLDriver does not actually implement the driver.Driver interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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