plugin

package
v0.0.0-...-9b27197 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Mock mock.Config `mapstructure:"mock"`
}

func (*Config) RegisterFlags

func (c *Config) RegisterFlags(flagPrefix string, f *flag.FlagSet)

type Plugin

type Plugin interface {
	Exec(ctx context.Context, rec *record.Record, stream io.Reader) error
	Filter(recs []*record.Record) []*record.Record
	Batches(recs []*record.Record) []*batch.Batch
	UpgradeVersion(ctx context.Context, version int) error
	GetVersion(ctx context.Context) (int, error)
	Dispose(ctx context.Context) error
}

func New

func New(cfg Config, log log.Logger) (Plugin, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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