Documentation
¶
Index ¶
- func NewBinImporter(appCtx context.Context, opts *connectors.Options, name string, ...) (importer.Importer, error)
- type BinImporter
- func (p *BinImporter) Close(ctx context.Context) error
- func (p *BinImporter) Flags() location.Flags
- func (p *BinImporter) Import(ctx context.Context, records chan<- *connectors.Record, ...) error
- func (p *BinImporter) Origin() string
- func (p *BinImporter) Ping(ctx context.Context) error
- func (p *BinImporter) Root() string
- func (p *BinImporter) Type() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BinImporter ¶
type BinImporter struct {
// contains filtered or unexported fields
}
func (*BinImporter) Flags ¶
func (p *BinImporter) Flags() location.Flags
func (*BinImporter) Import ¶
func (p *BinImporter) Import(ctx context.Context, records chan<- *connectors.Record, results <-chan *connectors.Result) error
Import runs pg_basebackup in tar-to-stdout mode and emits one record per tar entry. The results channel is used to pace reading: the loop waits for an ack after each record so the caller fully consumes the entry before tr.Next() advances the stream.
func (*BinImporter) Origin ¶
func (p *BinImporter) Origin() string
func (*BinImporter) Ping ¶
func (p *BinImporter) Ping(ctx context.Context) error
Ping verifies that the PostgreSQL server is reachable.
func (*BinImporter) Root ¶
func (p *BinImporter) Root() string
func (*BinImporter) Type ¶
func (p *BinImporter) Type() string
Click to show internal directories.
Click to hide internal directories.