extractors

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbExtractor

type DbExtractor interface {
	GetAll(*sql.Rows, *gorm.DB) (*pb.ReplayedEvent, error)
	GetInstance() interface{}
}

DbExtractor ...

type Extractor

type Extractor interface {
	Get() (time.Time, *pb.ReplayedEvent, error)
	StartQuery(ctx context.Context, sourceName string, options *pb.SourceReplay) error
	Next() bool
	Done()
	SetLogLevel(logrus.Level)
}

Extractor ...

type MongoExtractor

type MongoExtractor struct {
	DB          *libdb.MongoDB
	Proto       proto.Message
	WrapperFunc WrapperFunc
	Config      MongoExtractorConfig
	// contains filtered or unexported fields
}

MongoExtractor ...

func NewMongoExtractor

func NewMongoExtractor(db *libdb.MongoDB, wrapperFunc WrapperFunc, proto proto.Message, config MongoExtractorConfig) *MongoExtractor

NewMongoExtractor ...

func (*MongoExtractor) Done

func (ex *MongoExtractor) Done()

Done ...

func (*MongoExtractor) Get

func (ex *MongoExtractor) Get() (time.Time, *pb.ReplayedEvent, error)

Get ...

func (*MongoExtractor) Next

func (ex *MongoExtractor) Next() bool

Next ...

func (*MongoExtractor) SetLogLevel added in v0.3.0

func (ex *MongoExtractor) SetLogLevel(level logrus.Level)

SetLogLevel ...

func (*MongoExtractor) StartQuery

func (ex *MongoExtractor) StartQuery(ctx context.Context, collectionName string, queryOptions *pb.SourceReplay) error

StartQuery ...

type MongoExtractorConfig added in v0.3.0

type MongoExtractorConfig struct {
	IDFieldName   string
	SortFieldName string
}

MongoExtractorConfig ...

type PostgresExtractor

type PostgresExtractor struct {
	Extractor DbExtractor
	DB        *libdb.PostgresDB
	Config    PostgresExtractorConfig
	// contains filtered or unexported fields
}

PostgresExtractor ...

func NewPostgresExtractor

func NewPostgresExtractor(db *libdb.PostgresDB, extractor DbExtractor) *PostgresExtractor

NewPostgresExtractor ...

func (*PostgresExtractor) Done

func (ex *PostgresExtractor) Done()

Done ...

func (*PostgresExtractor) Get

Get ...

func (*PostgresExtractor) Next

func (ex *PostgresExtractor) Next() bool

Next ...

func (*PostgresExtractor) SetLogLevel added in v0.3.0

func (ex *PostgresExtractor) SetLogLevel(level logrus.Level)

SetLogLevel ...

func (*PostgresExtractor) StartQuery

func (ex *PostgresExtractor) StartQuery(ctx context.Context, tableName string, queryOptions *pb.SourceReplay) error

StartQuery ...

type PostgresExtractorConfig added in v0.3.0

type PostgresExtractorConfig struct {
	IDColumnName   string
	SortColumnName string
}

PostgresExtractorConfig ...

type WrapperFunc added in v0.3.0

type WrapperFunc = func(event proto.Message) *eventpb.Event

WrapperFunc ...

Jump to

Keyboard shortcuts

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