Help us shape the future of Go! Take the 2026 Go Developer Survey

importer

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: ISC Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewImporter

func NewImporter(appCtx context.Context, opts *connectors.Options, name string, config map[string]string) (importer.Importer, error)

Types

type Importer

type Importer struct {
	TokenProvider func(context.Context) (string, error) // optional; refreshes conn.Password before each subprocess
	// contains filtered or unexported fields
}

func NewImporterFromConfigMap

func NewImporterFromConfigMap(conn pgconn.ConnConfig, dbPath, connType string, config map[string]string) (*Importer, error)

NewImporterFromConfigMap creates an Importer from an already-constructed ConnConfig (e.g. one whose password was replaced with a fetched token) and the raw config map for the remaining option parsing. connType is the value returned by Type(); pass an empty string to use the default "postgresql".

func (*Importer) Close

func (p *Importer) Close(ctx context.Context) error

func (*Importer) Flags

func (p *Importer) Flags() location.Flags

Flags returns FLAG_STREAM to signal that Import produces a single streaming pass. Without it, the framework calls Import twice — once to enumerate records and once to read their contents — which would cause the manifest and the dump to be emitted twice.

func (*Importer) Import

func (p *Importer) Import(ctx context.Context, records chan<- *connectors.Record, results <-chan *connectors.Result) error

func (*Importer) Origin

func (p *Importer) Origin() string

func (*Importer) Ping

func (p *Importer) Ping(ctx context.Context) error

func (*Importer) Root

func (p *Importer) Root() string

func (*Importer) Type

func (p *Importer) Type() string

Jump to

Keyboard shortcuts

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