producer

package
v2.8.7 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: BSD-3-Clause Imports: 27 Imported by: 0

Documentation

Overview

package producer provides interfaces used to populate a finding aid where "populate" means updating a data store with information mapping a Who's On First ID to its corresponding repository name.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterProducer

func RegisterProducer(ctx context.Context, scheme string, init_func ProducerInitializationFunc) error

Types

type CSVProducer

type CSVProducer struct {
	Producer
	// contains filtered or unexported fields
}

func (*CSVProducer) Close

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

func (*CSVProducer) PopulateWithIterator

func (p *CSVProducer) PopulateWithIterator(ctx context.Context, monitor timings.Monitor, iterator_uri string, iterator_sources ...string) error

type DocstoreProducer added in v2.1.0

type DocstoreProducer struct {
	Producer
	// contains filtered or unexported fields
}

func (*DocstoreProducer) Close added in v2.1.0

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

func (*DocstoreProducer) PopulateWithIterator added in v2.1.0

func (p *DocstoreProducer) PopulateWithIterator(ctx context.Context, monitor timings.Monitor, iterator_uri string, iterator_sources ...string) error

type MultiProducer added in v2.2.0

type MultiProducer struct {
	Producer
	// contains filtered or unexported fields
}

func (*MultiProducer) Close added in v2.2.0

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

func (*MultiProducer) PopulateWithIterator added in v2.2.0

func (p *MultiProducer) PopulateWithIterator(ctx context.Context, monitor timings.Monitor, iterator_uri string, iterator_sources ...string) error

type NullProducer added in v2.2.0

type NullProducer struct {
	Producer
}

func (*NullProducer) Close added in v2.2.0

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

func (*NullProducer) PopulateWithIterator added in v2.2.0

func (p *NullProducer) PopulateWithIterator(ctx context.Context, monitor timings.Monitor, iterator_uri string, iterator_sources ...string) error

type Producer

type Producer interface {
	// PopulateWithIterator will crawl one or more paths with a `whosonfirst/go-whosonfirst-iterate/v2` iterator instance and populate a finding aid with each record encountered.
	PopulateWithIterator(context.Context, timings.Monitor, string, ...string) error
	Close(context.Context) error
}

Producer provides an interfaces used to populate a finding aid where "populate" means updating a data store with information mapping a Who's On First ID to its corresponding repository name.

func NewCSVProducer

func NewCSVProducer(ctx context.Context, uri string) (Producer, error)

func NewDocstoreProducer added in v2.1.0

func NewDocstoreProducer(ctx context.Context, uri string) (Producer, error)

func NewMultiProducer added in v2.2.0

func NewMultiProducer(ctx context.Context, uri string) (Producer, error)

func NewNullProducer added in v2.2.0

func NewNullProducer(ctx context.Context, uri string) (Producer, error)

func NewProducer

func NewProducer(ctx context.Context, uri string) (Producer, error)

func NewProtobufProducer

func NewProtobufProducer(ctx context.Context, uri string) (Producer, error)

func NewSQLProducer

func NewSQLProducer(ctx context.Context, uri string) (Producer, error)

func NewStdoutProducer added in v2.2.0

func NewStdoutProducer(ctx context.Context, uri string) (Producer, error)

type ProducerInitializationFunc

type ProducerInitializationFunc func(ctx context.Context, uri string) (Producer, error)

type ProtobufProducer

type ProtobufProducer struct {
	Producer
	// contains filtered or unexported fields
}

func (*ProtobufProducer) Close

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

func (*ProtobufProducer) PopulateWithIterator

func (p *ProtobufProducer) PopulateWithIterator(ctx context.Context, monitor timings.Monitor, iterator_uri string, iterator_sources ...string) error

type SQLProducer

type SQLProducer struct {
	Producer
	// contains filtered or unexported fields
}

func (*SQLProducer) Close

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

func (*SQLProducer) PopulateWithIterator

func (p *SQLProducer) PopulateWithIterator(ctx context.Context, monitor timings.Monitor, iterator_uri string, iterator_sources ...string) error

type StdoutProducer added in v2.2.0

type StdoutProducer struct {
	Producer
}

func (*StdoutProducer) Close added in v2.2.0

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

func (*StdoutProducer) PopulateWithIterator added in v2.2.0

func (p *StdoutProducer) PopulateWithIterator(ctx context.Context, monitor timings.Monitor, iterator_uri string, iterator_sources ...string) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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